-
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally프로그래밍/python 2019. 2. 25. 16:37728x90
구글 chromedriver centos7에서 사용시 다음과 같이 오류가 발생할 때
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.)
근본적으로 크롬 2.9버젼을 쓰면 발생하는 오류다
[추가 소스 부분]
options = webdriver.ChromeOptions()
options.add_argument('headless')
options.add_argument('window-size=1920x1080')
options.add_argument("disable-gpu")
options.add_argument("no-sandbox")
options.add_argument("--disable-dev-shm-usage")
# 혹은 options.add_argument("--disable-gpu")
options.add_argument("user-agent=Mozilla/5.0 "
"(Macintosh; Intel Mac OS X 10_12_6) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/61.0.3163.100 Safari/537.36")
options.add_argument("lang=ko_KR") # 한국어!
driver = webdriver.Chrome("./driver/chromedriver", chrome_options=options)
크롬 2.46을 사용하니까 잘 동작한다.728x90'프로그래밍 > python' 카테고리의 다른 글
Python argparse.ArgumentParser() (0) 2023.04.24 python coding style (0) 2019.03.06 pyinstaller를 이용한 tensorflow-gpu exe 파일 만들기 (5) 2018.11.09 Python DataFrame To excel with hyperlink (0) 2018.09.27 debian python3.6 package 설치 (0) 2018.09.05