【问题标题】:Selenium error - ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote hostSelenium 错误 - ConnectionResetError: [WinError 10054] 现有连接被远程主机强行关闭
【发布时间】:2016-10-20 14:45:31
【问题描述】:

我正在使用 selenium 模块,但突然出现此错误

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

这是给我错误的简单代码

from selenium import webdriver

browser = webdriver.Firefox()
browser.get('https://www.instagram.com/')

【问题讨论】:

  • 我试试你的代码,它可以工作......
  • 很奇怪。我对我的电脑做了什么你可能知道的可能会导致这个问题的事情吗?我似乎无法阻止它出现该错误
  • 我在使用 chromedriver 时遇到此错误,我下载了最新版本的 chromedriver 并已修复

标签: python python-3.x


【解决方案1】:

可能是时候为您的导航器升级 Webdriver。我在使用 Chrome 时遇到了同样的问题,用最新版本替换现有的 chromedriver.exe(在我的例子中是 windows)解决了。

【讨论】:

    【解决方案2】:

    我发现新的 firefox 47 更新是问题所在,我不得不将其降级到 firefox 46

    我从这里得到了信息 Selenium Webdriver halting with [Errno 10054]

    【讨论】:

    • 如果您找到了问题的解决方案,您应该接受自己的答案!
    【解决方案3】:

    我遇到了这个帖子,因为我遇到了同样的问题。更新到最新版本的 geckodriver 解决了我的问题

    【讨论】:

      猜你喜欢
      • 2018-01-02
      • 2020-04-20
      • 2023-03-03
      • 2020-10-09
      • 1970-01-01
      • 2015-02-28
      • 2015-05-24
      • 1970-01-01
      • 2021-02-02
      相关资源
      最近更新 更多