ucsdscheduleplanner / UCSD-Schedule-Planner

A project to help UCSD students plan their schedules quickly and easily.
https://sdschedule.com/
MIT License
7 stars 2 forks source link

On timeout exception scraping thread fails. #33

Closed CTrando closed 5 years ago

CTrando commented 5 years ago

File "/usr/local/lib/python3.7/threading.py", line 917, in _bootstrap_inner sdschedule-backend | self.run() sdschedule-backend | File "/usr/local/lib/python3.7/threading.py", line 865, in run sdschedule-backend | self._target(*self._args, **self._kwargs) sdschedule-backend | File "/app/scraper/scraper.py", line 117, in iter_departments_by_thread sdschedule-backend | self.iter_pages(department, browser) sdschedule-backend | File "/app/scraper/scraper.py", line 142, in iter_pages sdschedule-backend | browser.get(current_url) sdschedule-backend | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 333, in get sdschedule-backend | self.execute(Command.GET, {'url': url}) sdschedule-backend | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute sdschedule-backend | self.error_handler.check_response(response) sdschedule-backend | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response sdschedule-backend | raise exception_class(message, screen, stacktrace) sdschedule-backend | selenium.common.exceptions.TimeoutException: Message: timeout sdschedule-backend | (Session info: headless chrome=67.0.3396.99) sdschedule-backend | (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.15.0-29-generic x86_64) sdschedule-backend |

increase the timeout or maybe come up with a way that handles timeouts gracefully.