[問題] Chromedriver不能跑 與chrome版本不同?
Linux和編程方面都還是新手 求鞭小力一點QQ
如題 在ubuntu上跑一個python的時候出現這樣的問題
上網爬了一下有人說是chrome跟chromedriver版本不合
接著我把chrome跟chromedriver的版本都升到79
再重新跑一次還是一樣失敗 錯誤訊息都是寫這樣
jason@jason-BM5275-BM5375-BM5675:$ python one.py
one.py:31: DeprecationWarning: use options instead of chrome_options
driver = webdriver.Chrome(r"selenium_driver_chrome/chromedriver",chrome_opti
ons=options)
Traceback (most recent call last):
File "one.py", line 31, in <module>
driver = webdriver.Chrome(r"selenium_driver_chrome/chromedriver",chrome_op
tions=options)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/chrome/webdr
iver.py", line 81, in __init__
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdr
iver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdr
iver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdr
iver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/error
handler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not cr
eated: This version of ChromeDriver only supports Chrome version 76
jason@jason-BM5275-BM5375-BM5675:$ chromedriver --version
ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branc
h-heads/3945@{#614})
jason@jason-BM5275-BM5375-BM5675:$ chromium-browser --version
Chromium 79.0.3945.79 Built on Ubuntu , running on Ubuntu 18.04
我該怎麼解決這個問題呢?
把版本都降到76嗎
Chromedriver降到76我會 也嘗試過一樣失敗
Chrome找不到方法降回76 QQ
如果需要ubuntu版本我等等補上 應該是18.多
希望有人幫一下小新手 感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.216.4.187 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1580812125.A.810.html
※ 編輯: jason59420 (49.216.4.187 臺灣), 02/04/2020 18:36:53
推
02/05 08:02,
5年前
, 1F
02/05 08:02, 1F
推
02/05 08:04,
5年前
, 2F
02/05 08:04, 2F
Linux 近期熱門文章
PTT數位生活區 即時熱門文章
6
16