Current browser version is 101.0.4951.54 with binary解决

文章讲述了在使用PythonSelenium进行爬虫时遇到的错误,原因在于Google浏览器自动更新导致Chromedriver版本不匹配。解决方法包括卸载旧版浏览器,安装特定版本的ChromeDriver并取消浏览器自动更新。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目录

问题:

原因:

解决:

1. 卸载浏览器

2.安装新浏览器,取消自动更新

3.安装chromedriver.exe


问题:

今天在使用python selenium进行爬虫时,突然报错,前2天还正常使用

Current browser version is 101.0.4951.54 with binary path C:\Program Files\...

原因:

google浏览器自动更新了,需要将chromedriver.exe 也进行更新一下

解决:

由于浏览器更新到最新版本了,chromedriver.exe没有对应版本,需要将google卸载重新回退到老版本。同时需要关掉自动更新,要不然google安装上去又自动更新了

1. 卸载浏览器

右键卸载

2.安装新浏览器,取消自动更新

win+r 输入 services.msc

3.安装chromedriver.exe

https://chromedriver.storage.googleapis.com/index.html

找的对应版本安装

最新版本可以参考此方法解决:【Selenium】谷歌 chromedriver 114之后的版本下载方法_chrome test availability历史版本-CSDN博客

Selenium安装WebDriver:最新ChromeDriver谷歌驱动及闪退等常见问题(114及其以后的版本)_chrome驱动最新版本-CSDN博客

"D:\Program Files\python\python.exe" D:\pcWJ\测试项目\cs.py The chromedriver version (101.0.4951.41) detected in PATH at D:\download\火狐下载\chromedriver.exe might not be compatible with the detected chrome version (134.0.6998.178); currently, chromedriver 134.0.6998.165 is recommended for chrome 134.*, so it is advised to delete the driver in PATH and retry Traceback (most recent call last): File "D:\pcWJ\测试项目\cs.py", line 5, in <module> driver = webdriver.Chrome() ^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__ super().__init__( File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 66, in __init__ super().__init__(command_executor=executor, options=options) File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 250, in __init__ self.start_session(capabilities) File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 342, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 429, in execute self.error_handler.check_response(response) File "D:\Program Files\python\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 232, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 101 Current browser version is 134.0.6998.178 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe Stacktrace: Backtrace: Ordinal0 [0x00F1B8F3+2406643] Ordinal0 [0x00EAAF31+1945393] Ordinal0 [0x00D9C748+837448] Ordinal0 [0x00DBC8B3+968883] Ordinal0 [0x00DB84BA+951482] Ordinal0 [0x00DB5D71+941
最新发布
04-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值