2

I'm running a script with Selenium but just a couple days ago I started to receive the error below:

line 86, in <module> ChromeDriverManager().install()), options=opt)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/webdriver_manager/chrome.py", line 38, in install
    driver_path = self._get_driver_path(self.driver)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/webdriver_manager/core/manager.py", line 31, in _get_driver_path
    file = self._download_manager.download_file(driver.get_url())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/webdriver_manager/core/download_manager.py", line 28, in download_file
    response = self._http_client.get(url)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/webdriver_manager/core/http.py", line 32, in get
    self.validate_response(resp)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/webdriver_manager/core/http.py", line 15, in validate_response
    raise ValueError(f"There is no such driver by url {resp.url}")
ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac64_m1.zip

I've tried to do some research on GitHub back can't figure out the error https://github.com/SergeyPirogov/webdriver_manager/issues/443

C_Turbo
  • 139
  • 1
  • 8

1 Answers1

5

Because google has changed the link to chromedriver for apple silicon macs, It seems that the new link is https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac_arm64.zip, and the maintainer of webdriver-manager has not patched it yet. When they do you can try updating your webdriver_manager.

pip install webdriver-manager --upgrade

But for now, you should go directly to the link above and download chromedriver directly. You can import it using selenium after you unzip it and the rest of your code will stay the same.

The code will go something like,

from selenium import webdriver

browser = webdriver.Chrome(executable_path=r"/path/to/chromedriver")

Update:

This guide will not work with selenium 4.10.0, follow TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path' in Selenium Python if you want to use 4.10.0.

Or you can install 4.6.0 and follow this.

anarchy
  • 3,709
  • 2
  • 16
  • 48
  • 1
    thanks for the help! Downloading the driver directly worked perfectly – C_Turbo Oct 13 '22 at 01:48
  • That worked. Just when selenium 4 on python was so beautifully abstracted until now :( – Sridhar Sarnobat Jul 21 '23 at 21:52
  • It gives an error: TypeError: __init__() got an unexpected keyword argument 'executable_path' – Nagesh Singh Chauhan Jul 25 '23 at 02:46
  • 1
    @NageshSinghChauhan this post was made last year, you have to use an older version of selenium, less than 4.10, try 4.6.0, if you want to use the latest, follow this https://stackoverflow.com/questions/76550506/typeerror-webdriver-init-got-an-unexpected-keyword-argument-executable-p – anarchy Jul 25 '23 at 17:44