gpt4 book ai didi

python - 使用 python 3 的 Selenium 中的 WebDriverException

转载 作者:太空宇宙 更新时间:2023-11-03 16:02:31 25 4
gpt4 key购买 nike

我在 Windows 上使用 python 3,使用 Selenium 包使用 Chrome 进行网络爬行。我在一台新计算机上运行,​​执行所有相同的操作,但在第一次运行时立即出现以下错误。我从来没有见过这个异常。任何人都熟悉它并且可以透露一些信息吗?谢谢。

    WebDriverException: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"9668.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.3.9600 x86_64)

异常在驱动程序调用开始时立即发生:

    driver = webdriver.Chrome()

更新:升级到 chromeDriver2.4 后,出现了一个我以前从未见过的不同错误:

WebDriverException:未知错误:无法发现打开的页面 (驱动程序信息:chromedriver=2.4.226107,platform=Windows NT 6.1 SP1 x86_64)

有什么想法吗?谢谢...

最佳答案

确保更新到最新的驱动程序。我遇到了同样的问题——正在使用 2.22 并更新到 2.24。解决了问题。

最新驱动程序请参见此处:(点击最新发布) http://chromedriver.storage.googleapis.com/index.html

关于python - 使用 python 3 的 Selenium 中的 WebDriverException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40205687/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com