Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno 8] Exec format error #675

Open
matabarestestiando opened this issue Aug 5, 2024 · 3 comments
Open

OSError: [Errno 8] Exec format error #675

matabarestestiando opened this issue Aug 5, 2024 · 3 comments

Comments

@matabarestestiando
Copy link

On Apple M2 I'm getting this error:

Traceback (most recent call last):
File "/Users/myuser/PycharmProjects/pythonProject3/main.py", line 117, in
automation()
File "/Users/myuser/PycharmProjects/pythonProject3/main.py", line 53, in automation
browser = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=chrome_options)
File "/Users/myuser/PycharmProjects/pythonProject3/venv/lib/python3.10/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init
super().init(
File "/Users/myuser/PycharmProjects/pythonProject3/venv/lib/python3.10/site-packages/selenium/webdriver/chromium/webdriver.py", line 55, in init
self.service.start()
File "/Users/myuser/PycharmProjects/pythonProject3/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 98, in start
self._start_process(self._path)
File "/Users/myuser/PycharmProjects/pythonProject3/venv/lib/python3.10/site-packages/selenium/webdriver/common/service.py", line 208, in _start_process
self.process = subprocess.Popen(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1863, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/myuser/.wdm/drivers/chromedriver/mac64/127.0.6533.88/chromedriver-mac-arm64/THIRD_PARTY_NOTICES.chromedriver'

@CalebePrates
Copy link

chrome_path = ChromeDriverManager().install()
if "THIRD_PARTY_NOTICES.chromedriver" in chrome_path:
    chrome_path = chrome_path.replace("THIRD_PARTY_NOTICES.chromedriver", "chromedriver")

@Emishne
Copy link

Emishne commented Aug 6, 2024

  1. Make sure you're using the latest version
  2. in .wdm/drivers.json, remove the versions with HIRD_PARTY_NOTICES.chromedriver
  3. run again

@matabarestestiando
Copy link
Author

It works just upgrading webdriver-manager==4.0.2

Thanks @Emishne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants