fbuetler / asvz-bot

ASVZ Bot to enroll to lessons. Get a place when the registration opens or when a place gets free. Works for ETH, UZH and ZHAW students.
GNU General Public License v3.0
66 stars 25 forks source link

Element on website not found #22

Closed Glanfaloth closed 1 year ago

Glanfaloth commented 1 year ago

Dear Florian, could you look into this error when you have time? Thank you

2023-03-07 21:55:48 ERROR    Element on website not found! This may happen when the website was updated recently. Please report this incident to: https://github.com/fbuetler/asvz-bot/issues
2023-03-07 21:55:48 ERROR    Element on website not found! This may happen when the website was updated recently. Please report this incident to: https://github.com/fbuetler/asvz-bot/issues
Traceback (most recent call last):
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 614, in <module>
    main()
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 610, in main
    enroller.enroll()
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 267, in enroll
    raise e
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 264, in enroll
    ) = AsvzEnroller.__get_enrollment_and_start_time(driver)
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 336, in __get_enrollment_and_start_time
    raise e
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 333, in __get_enrollment_and_start_time
    lesson_start = AsvzEnroller.__get_lesson_time(driver)
  File "/Users/Downloads/asvz-bot/src/asvz_bot.py", line 374, in __get_lesson_time
    lesson_interval_raw = driver.find_element(
  File "/Users/Downloads/asvz-bot/src/.venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 1244, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/Users/Downloads/asvz-bot/src/.venv/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 424, in execute
    self.error_handler.check_response(response)
  File "/Users/Downloads/asvz-bot/src/.venv/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//dl[contains(., 'Datum/Zeit')]/dd"}
  (Session info: headless chrome=111.0.5563.64)
Glanfaloth commented 1 year ago

Hm it worked again when I ran it a second time