首页 > 其他 > 详细

「Selenium」- Can not connect to the Service /path/to/chromedriver @20210211

时间:2021-02-12 08:12:28      阅读:30      评论:0      收藏:0      [点我收藏+]

问题描述

# python3.7 /tmp/demo.py
Traceback (most recent call last):
  File "/tmp/demo.py", line 4, in <module>
    driver = webdriver.Chrome(‘/srv/sharing/packages/chromedriver_linux64/chromedriver‘)  # Optional argument, if not specified will search path.
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/common/service.py", line 104, in start
    raise WebDriverException("Can not connect to the Service %s" % self.path)
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service /srv/sharing/packages/chromedriver_linux64/chromedriver

问题原因

Selenium python: Can not connect to the Service %s" % self.path
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service geckodriver

解决办法

添加 127.0.1.1 localhost 到 /etc/hosts 文件。

相关文章

「Selenium Grid 3」- Node xxxxx has no free slots(close() vs quit())
「Selemium」- ChromeDriver only supports characters in the BMP

参考文献

Selenium python: Can not connect to the Service %s" % self.path
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service geckodriver


「Selenium」- Can not connect to the Service /path/to/chromedriver @20210211

原文:https://www.cnblogs.com/k4nz/p/14398145.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!