【问题标题】:WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 with ChromeDriver and Selenium in UbuntuWebDriverException:消息:服务 chromedriver 意外退出。状态码是:127 with ChromeDriver and Selenium in Ubuntu
【发布时间】:2019-05-07 17:54:19
【问题描述】:

这是我在执行代码时收到的错误:

driver = webdriver.Chrome(options=chrome_options)

文件 "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", 第 73 行,在 init 中 self.service.start() 文件“/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py”, 第 98 行,开始 self.assert_process_still_running() 文件“/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py”, 第 111 行,在 assert_process_still_running %(self.path,return_code)selenium.common.exceptions.WebDriverException:消息:服务 chromedriver 意外退出。状态码是:127

【问题讨论】:

  • 你使用的是哪个版本的chrome浏览器和驱动?
  • 谷歌浏览器 71.0.3578.80
  • 和你的 chrome 驱动版本?
  • 71.0.3578.33/chromedriver_linux64
  • 您需要从chromedriver.chromium.org/downloads这里安装与您的chrome浏览器兼容的chrome驱动程序。

标签: python selenium google-chrome ubuntu selenium-chromedriver


【解决方案1】:

driver = webdriver.Chrome() 尝试删除参数。这可能是因为两个不同的 chrome 驱动程序。 如果仍然无法正常工作,请参考link 另外,使用python3编译。

【讨论】:

    猜你喜欢
    • 2018-08-25
    • 2019-05-31
    • 2020-09-16
    • 2019-05-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-23
    • 1970-01-01
    相关资源
    最近更新 更多