selenium.common.exceptions.WebDriverException:消息:服务chromedriver意外退出。状态码为:127

时间:2019-05-08 11:43:45

标签: python docker selenium-chromedriver

我正在尝试在使用selenium chrome驱动程序连接到网站的docker内部运行python脚本,但是该脚本引发错误selenium.common.exceptions.WebDriverException:消息:服务chromedriver意外退出。状态代码为:127。

我已经检查了Docker Selenium: selenium.common.exceptions.WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127。但是我的问题没有解决

chrome_options = Options()
chrome_options.add_argument('--headless')
#chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-gpu')
driver = webdriver.Chrome (options=chrome_options)

getSpeeds中第44行的文件“ putdata.py”
driver = webdriver.Chrome(options = chrome_options)
init
中的文件“ /usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py”,第73行 self.service.start()
在开始处的文件“ /usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py”,第98行
self.assert_process_still_running()
在assert_process_still_running中的文件“ /usr/local/lib/python3.7/site-packages/selenium/webdriver/common/service.py”,第111行
%(self.path,return_code)
selenium.common.exceptions.WebDriverException:消息:服务chromedriver意外退出。状态码为:127

0 个答案:

没有答案