码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2021-02-15 12:38:15      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:har   div   bmp   class   tps   raise   ons   close   grid   

问题描述

# 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

标签:har   div   bmp   class   tps   raise   ons   close   grid   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!