(该进程从chrome位置/ usr / bin / google-chrome开始不再运行,因此ChromeDriver假定Chrome崩溃了。)

时间:2018-11-24 09:35:06

标签: python selenium selenium-webdriver selenium-chromedriver

centos + python + selenium错误

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.44.609551 (5d576e9a44fe4c5b6a07e568f1ebc753f1214634),platform=Linux 3.10.0-862.2.3.el7.x86_64 x86_64)

我的代码是:

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
DRIVER = webdriver.Chrome('/opt/chromedriver/chromedriver')

我如何在centos 7.5.1804中运行chromedriver?

0 个答案:

没有答案