Home > Back-end >  ValueError: There is no such driver by url (chromedriver_mac64_m1.zip)
ValueError: There is no such driver by url (chromedriver_mac64_m1.zip)

Time:10-13

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

CodePudding user response:

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 here https://chromedriver.storage.googleapis.com/106.0.5249.61/chromedriver_mac_arm64.zip 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")
  • Related