前提・実現したいこと
selenium,chromedriver初心者です。
VPS(conoha)上で、pythonのプログラムを実行したいのですが、
上手く動かず、、下記のエラーで詰まっています。
実行環境
conoha Ubuntu Python 3.6.7 Google Chrome: 72.0.3626.81 ChromeDriver : 2.46.628388
発生している問題・エラーメッセージ
Traceback (most recent call last): File "test.py", line 6, in <module> driver = webdriver.Chrome(executable_path=r'/usr/local/bin/chromedriver', chrome_options=chrome_options, service_args=['--verbose', '--log-path=/tmp/logs/chromedriver.log']) File "/home/segu/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__ self.service.start() File "/home/segu/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 98, in start self.assert_process_still_running() File "/home/segu/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running % (self.path, return_code) selenium.common.exceptions.WebDriverException: Message: Service /usr/local/bin/chromedriver unexpectedly exited. Status code was: 1
該当のソースコード
python3
1from selenium import webdriver 2 3chrome_options = webdriver.ChromeOptions() 4#chrome_options.add_argument('--headless') 5 6driver = webdriver.Chrome(executable_path=r'/usr/local/bin/chromedriver', chrome_options=chrome_options, service_args=['--verbose', '--log-path=/tmp/logs/chromedriver.log']) 7 8driver.get('https://google.org') 9print(driver.title)
あなたの回答
tips
プレビュー