Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (120 points)
Trying to use a code on a Mac, I have downloaded the most recent version of ChromeDriver, however I am still getting this error.

runfile('/Applications/scraping imdb.py', wdir='/Applications')

Traceback (most recent call last):

  File "<ipython-input-25-6827653d4a71>", line 1, in <module>

    runfile('/Applications/scraping imdb.py', wdir='/Applications')

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile

    execfile(filename, namespace)

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile

    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/Applications/scraping imdb.py", line 12, in <module>

    driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__

    self.service.start()

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 83, in start

    os.path.basename(self.path), self.start_error_message)

WebDriverException: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

runfile('/Applications/scraping imdb.py', wdir='/Applications')

Traceback (most recent call last):

  File "<ipython-input-26-6827653d4a71>", line 1, in <module>

    runfile('/Applications/scraping imdb.py', wdir='/Applications')

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile

    execfile(filename, namespace)

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile

    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/Applications/scraping imdb.py", line 12, in <module>

    driver = webdriver.Chrome(executable_path='C:/path/to/chromedriver.exe')

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__

    self.service.start()

  File "/Users/nichollelindsey/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/common/service.py", line 83, in start

    os.path.basename(self.path), self.start_error_message)

WebDriverException: 'chromedriver.exe' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

1 Answer

0 votes
by (50.2k points)
Here the error clearly mentions that the chromedriver.exe file should be placed in the path and again this code which you are working has some errors kindly recheck it and also kindly keep the .exe file in the location and then copy and paste the location in the code that will work for you.

Browse Categories

...