python - 仅在我的机器上出现错误 10054“现有连接被远程主机强制关闭”?
问题描述
我正在尝试使用 Python/Selenium 启动 Internet Explorer Web 浏览器。当我尝试运行代码时,收到如上所述的错误“urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '现有连接被远程主机强行关闭', None, 10054,没有任何))”。
这个错误只发生在我的机器上,我的同事机器似乎能够很好地启动代码/浏览器。
阅读各种网站,尝试所有解决方案:https ://www.joecolantonio.com/selenium-webdriver-fix-for-3-common-ie-errors/ 。
从 selenium 导入 webdriver 导入 selenium
驱动程序 = selenium.webdriver.Ie()
driver.get(' http://www.google.com ')
预期结果应该是 Internet Explorer Web 浏览器打开并导航到 google.com。
实际结果是 Error 10054: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forced closed by the remote host', None, 10054, None))
解决方案
推荐阅读
- python-3.x - boto3 是否可以选择覆盖 DNS 查找?
- sql-server - 从 SQL Server 中的多个 XML 列查询
- vue.js - 将雪包与 vue 模板一起使用,但 chrome dev-tools 不适用于它
- mongodb - 在树莓派中将大型 Bson 文件导入 mongo db
- wordpress - 如何将 Elementor Wordpress 与 Git 同步?
- html - CSS规则对后代没有影响
标签
- c# - 如何在操作结果中创建 110 - 150 之间的自定义 HTTP 状态代码?
- node.js - 如何重试mongodb事务?
- postgresql - 从 Postgres 中的 csv 文件导入数据
- elasticsearch - ElasticSearch:日期时间格式的平均聚合