MatthewWolff/TwitterScraper

Timeout error when attempting to connect

Closed this issue · 1 comments

Hi. I'm trying to run this script through a Linux subsystem on Windows 10 (Ubuntu). I am getting the following timeout error when trying to connect.

./scrape.py -u OtogibaraEra
[ scraping user @otogibaraera... ]
[ 0 existing tweets in otogibaraera.json ]
[ searching for tweets... ]
Traceback (most recent call last):
  File "./scrape.py", line 284, in <module>
    user.scrape(begin, end, args.by, args.delay)
  File "./scrape.py", line 103, in scrape
    self.__find_tweets(start, end, by, loading_delay)
  File "./scrape.py", line 174, in __find_tweets
    with init_chromedriver(debug=False) as driver:  # options are Chrome(), Firefox(), Safari()
  File "./scrape.py", line 267, in init_chromedriver
    return webdriver.Chrome(options=options)
  File "/home/hzhu/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "/home/hzhu/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/hzhu/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/hzhu/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/hzhu/.local/lib/python3.6/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
from timeout: Timed out receiving message from renderer: 600.000
  (Session info: headless chrome=89.0.4389.82)

I installed all the modules as directed, except the chrome driver which I installed with
sudo apt-get install chromium-chromedriver
as homebrew only supports installing casks on macos.

Do you have any advice for my problem?

I'm assuming that no additional help is needed with this now ;(