当前位置:网站首页>成功解决:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versi
成功解决:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This versi
2022-06-24 13:03:00 【小袁ITSuper】
成功解决:selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 100
报错问题
报错问题:
browser = webdriver.Chrome(chrome_options=chrome_options)
Traceback (most recent call last):
File "E:/Python/test3.py", line 73, in <module>
main()
File "E:/Python/test3.py", line 65, in main
baidu_search(search_keyword[0], max_page)
File "E:/Python/test3.py", line 52, in baidu_search
browser = webdriver.Chrome(chrome_options=chrome_options)
File "D:\Python3.8\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 70, in __init__
super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
File "D:\Python3.8\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 93, in __init__
RemoteWebDriver.__init__(
File "D:\Python3.8\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 268, in __init__
self.start_session(capabilities, browser_profile)
File "D:\Python3.8\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 359, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "D:\Python3.8\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "D:\Python3.8\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, 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 100
Current browser version is 102.0.5005.115 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
Stacktrace:
Backtrace:
Ordinal0 [0x00437413+2389011]
Ordinal0 [0x003C9F61+1941345]
Ordinal0 [0x002BC658+837208]
Ordinal0 [0x002DC773+968563]
Ordinal0 [0x002D837A+951162]
Ordinal0 [0x002D5C51+941137]
Ordinal0 [0x00308C80+1150080]
Ordinal0 [0x003088DA+1149146]
Ordinal0 [0x00303F66+1130342]
Ordinal0 [0x002DE546+976198]
Ordinal0 [0x002DF456+980054]
GetHandleVerifier [0x005E9632+1727522]
GetHandleVerifier [0x0069BA4D+2457661]
GetHandleVerifier [0x004CEB81+569713]
GetHandleVerifier [0x004CDD76+566118]
Ordinal0 [0x003D0B2B+1968939]
Ordinal0 [0x003D5988+1989000]
Ordinal0 [0x003D5A75+1989237]
Ordinal0 [0x003DECB1+2026673]
BaseThreadInitThunk [0x7674FA29+25]
RtlGetAppContainerNamedObjectPath [0x77087A9E+286]
RtlGetAppContainerNamedObjectPath [0x77087A6E+238]
Process finished with exit code 1
解决思路
报错内容翻译:此版本的ChromeDriver仅支持Chrome版本100,需要升级Chrome驱动版本WebDriver
解决方法
1. 下载对应的Chrome驱动版本:http://chromedriver.storage.googleapis.com/index.html

2. 安装包解压后放进Python安装路径下

边栏推荐
- 数据库注意事项
- Docker installation redis
- 厨卫电器行业B2B交易协同管理平台开发,优化企业库存结构
- laravel下视图间共享数据
- Unity 热力图建立方法
- [R language data science] (XIV): random variables and basic statistics
- 数据库一些基本操作(提供了原数据库信息)
- NPM package [details] (including NPM package development, release, installation, update, search, uninstall, view, version number update rules, package.json details, etc.)
- Promotion of Project Manager
- ASCII code table extracted from tanhaoqiang's C program design (comparison table of common characters and ASCII codes)
猜你喜欢

Win10 system problems

How to manage tasks in the low code platform of the Internet of things?

【深度学习】NCHW、NHWC和CHWN格式数据的存储形式

常见的单例模式&简单工厂

Rongyun communication has "hacked" into the heart of the bank

puzzle(016.2)指画星河

Antd checkbox, limit the selected quantity

Linux 安装 CenOS7 MySQL - 8.0.26

专精特新“小巨人”再启动,“企业上云”数字赋能

卷积核、特征图可视化
随机推荐
根据前序&中序遍历生成二叉树[左子树|根|右子树的划分/生成/拼接问题]
MySQL日志管理、备份与恢复
一文搞定 UDP 和 TCP 高频面试题!
【LeetCode】10、正则表达式匹配
CONDA and pip commands
数据库一些基本操作(提供了原数据库信息)
Generate binary tree according to preorder & inorder traversal [partition / generation / splicing of left subtree | root | right subtree]
专精特新“小巨人”再启动,“企业上云”数字赋能
Puzzle (016.2) finger painting Galaxy
谷歌WayMo提出R4D: 采用参考目标做远程距离估计
Halcon 绘制区域 到图片中
Simulated 100 questions and answers of fluorination process examination in 2022
leetcode:1504. Count the number of all 1 sub rectangles
One click to generate University, major and even admission probability. Is it so magical for AI to fill in volunteer cards?
Can a team do both projects and products?
SaaS management system solution of smart Park: enabling the park to realize information and digital management
The difference between V-IF and v-show
打败 二叉树!
MIT-6.824-lab4A-2022(万字讲解-代码构建)
NPM package [details] (including NPM package development, release, installation, update, search, uninstall, view, version number update rules, package.json details, etc.)