chrome driver version 122.0.6261.95

15.5k Views Asked by At

My chrome version is 122.0.6261.95. But there is only 122.0.6261.94 on the chrome driver download web. So I downloaded this and unzipped it to get chromedriver.exe and Lisence.chromedriver. I placed these two files in the Python file directory. however

raceback (most recent call last): File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path path = SeleniumManager().driver_location(options) if path is None else path ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 90, in driver_location output = self.run(args) ^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\selenium_manager.py", line 138, in run raise WebDriverException(f"Unsuccessful command executed: {command}.\n{result}{stderr}") selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser chrome --output json. {'code': 69, 'message': 'Driver unavailable: Driver path: ', 'driver_path': '', 'browser_path': ''}

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "c:\Users\user\Desktop\�꒵����\��ũ�Ѹ�\insta\app.py", line 6, in driver = webdriver.Chrome() ^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in init self.service.path = DriverFinder.get_path(self.service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user\AppData\Roaming\Python\Python311\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path raise NoSuchDriverException(msg) from err selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

It pops up like this.

What is the problem? How do I solve it?

try to find some download chrome driver set on my chrome version, and find to solve the problem,...

2

There are 2 best solutions below

0
Ricky Mleczko On

I encountered this problem today as well. I found a solution in the link provided at the end of the error report, which can be found at https://github.com/SergeyPirogov/webdriver_manager?tab=readme-ov-file#use-with-chrome.

Firstly, you need to install pip install webdriver-manager, and then you can use the following code snippet to create a Chrome browser driver if you are using selenium 4

from selenium import webdriver

from selenium.webdriver.chrome.service import Service as ChromeService

from webdriver_manager.chrome import ChromeDriverManager

driver=webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))

I hope it can work.

0
Mausam Kumar On

I had the same issue.

  • First, download the Chrome driver and unzip it

  • create a path for your chrome driver like this

    from selenium import webdriver
    path = '/Users/sanjaymahto/Documents/mausham- kumar/chromedriver_mac64\chromdriver.exe'.   # path of your webdrive 
    driver = webdriver.Chrome()