简体   繁体   English

Python:Selenium-消息:未知错误:Chrome无法启动:异常退出

[英]Python : Selenium - Message: unknown error: Chrome failed to start: exited abnormally

I am trying to start chrome driver in Linux 3.10.0-327.36.3.el7 using selenium with python. 我正在尝试使用selenium和python在Linux 3.10.0-327.36.3.el7中启动chrome驱动程序。 Also got some useful help from the chrome documentation , my extract code snippet is 还从chrome文档中获得了一些有用的帮助,我的提取代码段是

chromedriver = "/path/to/bin/chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver,
              service_log_path = service_log_path, service_args=service_args)

But I am getting the error message below, 但是我收到以下错误消息,

Message: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 3.10.0-327.36.3.el7 消息:未知错误:Chrome无法启动:无法正常退出(驱动程序信息:chromedriver = 2.29.461571(8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),平台= Linux 3.10.0-327.36.3.el7

I dont see a problem in the code (as far as I know), please help me with some fix. 我没有在代码中看到问题(据我所知),请帮助我进行一些修复。

Not sure if you made your chromedriver executable ( on a Ubuntu/Linux/Mac system). 不知道您是否使chromedriver可执行(在Ubuntu / Linux / Mac系统上)。 If you didn't do that, your chromedriver wouldn't work. 如果您不这样做,则chromedriver无法正常工作。

Please try this - if you haven't 请尝试-如果您还没有

 chmod +x chromedriver

 chmod 777 chromedriver

And then try again. 然后再试一次。 I wrote a simple script for this and I was able to get my chrome started perfectly - 我为此写了一个简单的脚本,就能完美启动chrome-

import os
from selenium import webdriver

chrome_path="/home/rahul/Documents/SeleniumPy/chromedriver" //this is my chromedriver path

driver=webdriver.Chrome(chrome_path)

driver.maximize_window()

driver.implicitly_wait(30)
driver.get('http://www.google.com')

driver.quit()

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebDriverException:消息:未知错误:Chrome 无法启动:使用 ChromeDriver Chrome 和 Selenium Python 异常退出错误 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally error using ChromeDriver Chrome and Selenium Python WebDriverException:消息:未知错误:Chrome 无法启动:通过 VPS 上的 Python 使用 ChromeDriver Chrome 和 Selenium 异常退出 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium through Python on VPS selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome无法启动:使用ChromeDriver Chrome和Selenium异常退出 - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium 设置 selenium 与 headless chrome 错误:WebDriverException:消息:未知错误:Chrome 无法启动:异常退出 - Setup selenium with headless chrome error: WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally WebDriverException:消息:未知错误:Chrome 无法启动:通过 WebDriverManager 使用 Selenium ChromeDriver 和 Chrome 异常退出 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally using Selenium ChromeDriver and Chrome through WebDriverManager WebDriverException:消息:未知错误:Chrome 无法启动:在 debian 服务器上使用 ChromeDriver Chrome 和 Selenium 异常退出 - WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally with ChromeDriver Chrome and Selenium on debian server 未知错误:Chrome 无法启动:异常退出 - Unknown error: Chrome failed to start: exited abnormally TDD-Django(部署)错误:selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome无法启动:异常退出 - TDD-Django(deploy) Error : selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally 未知错误:Chrome 无法启动:通过 Selenium 和 Python 使用带有无头 chrome 的 user-data-dir 参数退出异常错误 - unknown error: Chrome failed to start: exited abnormally error using user-data-dir argument with headless chrome through Selenium and Python selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome 无法启动:异常退出。 Dockerize Flask 应用程序 - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. Dockerize Flask Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM