selenium.common.exceptions.WebDriverException:消息:无法连接到服务 C:\Path\chromedriver.exe
突然间,我开始收到此错误消息,我在这个项目上使用 Selenium 和 Chromedriver 一段时间了,没有出现任何问题,据我所知,我没有更改任何内容来导致此错误。
我读过一些关于这个问题的帖子,但一直无法解决。
我有两个具有完全相同的 Selenium 代码的项目,一个是我刚刚获得 Selenium 部分的项目,另一个是完整的 Django 项目,使用 Celery 来运行 Selenium 任务。
- Chromedriver 在仅限硒的项目中仍然工作正常(该项目具有与 Django 项目完全相同的代码和设置)
- 过去一周,Chromedriver 在我的 Django-Celery 项目中一直工作正常(当我将仅限硒的代码移至在 celery 任务中运行)。我没有更改我的 Django-Celery 项目中的任何值得注意的内容以使其停止工作
- 我已经检查过并将 127.0.0.1 添加到 etc/hosts 文件中(它已经存在)
- 我正在使用 Windows
我没有知道问题是什么,这个问题几天前出现过,但只发生过一次,在我重试后就消失了,现在我根本无法启动 Selenium。
All of a sudden I've started getting this error message, I've been using Selenium and Chromedriver for a while on this project with no issues and as far as I'm aware I've not changed anything to cause this error.
I've read a few posts with this question but haven't been able to solve it.
I've got two projects with the exact same Selenium code, one where I've just got the Selenium part and another that is a full Django project, using Celery to run the Selenium task.
- Chromedriver is working fine still in the selenium-only project (that has exactly the same code and setup as the Django project)
- Chromedriver has been working fine in my Django-Celery project for the past week (when I moved my selenium-only code over to run in celery tasks). I've not changed anything of note in my Django-Celery project to make it stop working
- I've checked and 127.0.0.1 is added to etc/hosts file (it was there already)
- I'm using Windows
I've got no idea what the problem is, this came up a few days ago but then only happened once and went away after I retried, now I can't start Selenium at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论