M什么名字
M什么名字

Reputation: 21

This version of ChromeDriver only supports Chrome version 78

I want to web scraping from Glassdoor. And find a package from https://github.com/MatthewChatham/glassdoor-review-scraper

I download the chromedriver with 78.0.3904.11 version. but when I run my python file, it keeps saying:

2019-09-29 15:57:25,182 INFO 363    :main2.py(10991) - Configuring browser
Traceback (most recent call last):
  File "main2.py", line 397, in <module>
    browser = get_browser()
  File "main2.py", line 368, in get_browser
    browser = wd.Chrome(options=chrome_options)
  File "/usr/local/var/pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/usr/local/var/pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/var/pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/var/pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/var/pyenv/versions/anaconda3-2019.03/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 78

I have no idea why...

Upvotes: 2

Views: 7776

Answers (1)

user7661619
user7661619

Reputation:

The major versions of chromedriver and your Chrome browser need to match exactly. So, you should use chromedriver 77 for Chrome 77, and chromedriver 78 for Chrome 78. If the versions don't match, you need to download the version of chromedriver that matches your web browser's major version which is accessible from this link.

To check versions, do the following:

  • Chrome browser:

    • type 'chrome://version/' in the URL bar
    • the first line starting with 'Google Chrome:' should display your browser's version
  • chromedriver:

    • open the command line
    • change your working directory to the directory containing chromedriver
    • type './chromedriver -v' to print its version

Upvotes: 9

Related Questions