neelsomani / senator-filings

Scrape public filings of the buy + sell orders of U.S. senators and calculate their returns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chromedriver-mac is incompatible with latest release of Chrome on MacOS

dknupp opened this issue · comments

[Caveat: I realize that there's an open pull request to switch to requests + BeautifulSoup, but just noting in the meantime that this issue exists.]

The latest version of Chrome for MacOS is Version 83.0.4103.61 (Official Build) (64-bit), and appears to require ChromeDriver 83.0.4103.39. chromedriver-mac included in this repo is ChromeDriver 81.0.4044.69. I was able to workaround the problem by replacing chromedriver-mac with the newest release.

I don't know if this issue exists on other platforms or not.

$ python main.py
Traceback (most recent call last):
  File "main.py", line 189, in <module>
    senator_txs = main()
  File "main.py", line 160, in main
    driver = open_page()
  File "main.py", line 43, in open_page
    driver = webdriver.Chrome('./chromedriver-mac')
  File "/Users/dknupp/venvs/dev3/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/Users/dknupp/venvs/dev3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/Users/dknupp/venvs/dev3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/Users/dknupp/venvs/dev3/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/Users/dknupp/venvs/dev3/lib/python3.8/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 81

Hi @dknupp, thanks for flagging this! I'll leave this issue open in case anyone has similar issues until the PR to remove Selenium is merged.

Closing this issue now that I've removed the Selenium dependency. Let me know if you run into any issues!