[问题] Chromedriver不能跑 与chrome版本不同?

楼主: jason59420 (帅哲)   2020-02-04 18:28:43
Linux和编程方面都还是新手 求鞭小力一点QQ
如题 在ubuntu上跑一个python的时候出现这样的问题
上网爬了一下有人说是chrome跟chromedriver版本不合
接着我把chrome跟chromedriver的版本都升到79
再重新跑一次还是一样失败 错误讯息都是写这样
[email protected]:$ 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
[email protected]:$ chromedriver
作者: Kitten1156 (Frank_kitten)   2020-02-05 08:02:00
你是怎么升级chromedriver的?我都直接抓新的driver指定路径就能用了

Links booklink

Contact Us: admin [ a t ] ucptt.com