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

hi, some issue on driver dir from mac os\ #3

Open
Shahar-Katzir opened this issue May 6, 2024 · 1 comment
Open

hi, some issue on driver dir from mac os\ #3

Shahar-Katzir opened this issue May 6, 2024 · 1 comment

Comments

@Shahar-Katzir
Copy link

File "gmail_automation.py", line 16, in
driver = webdriver.Chrome(service=service) #, options=chrome_options)
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init
super().init(
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 53, in init
self.service.start()
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
self._start_process(self._path)
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 204, in _start_process
self.process = subprocess.Popen(
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'chromedriver.exe'
shahar.katzir@MacBook-Pro Gmail-Creation-Automation-Python % python gmail_automation.py

Traceback (most recent call last):
File "gmail_automation.py", line 16, in
driver = webdriver.Chrome(service=service) #, options=chrome_options)
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in init
super().init(
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/chromium/webdriver.py", line 53, in init
self.service.start()
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 98, in start
self._start_process(self._path)
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 204, in _start_process
self.process = subprocess.Popen(
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Users/shahar.katzir/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
NotADirectoryError: [Errno 20] Not a directory: 'chromedriver.exe'

@khaouitiabdelhakim
Copy link
Owner

Hey bro,
Make sure you have downloaded the Chrome WebDriver appropriate for your system. You can get it from the official Selenium website or through a package manager like Homebrew.

For example, if you've downloaded the WebDriver and placed it in a directory like /usr/local/bin, your code should look something like this:

`from selenium import webdriver

chrome_driver_path = '/usr/local/bin/chromedriver'
driver = webdriver.Chrome(executable_path=chrome_driver_path)
`

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

2 participants