Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle cancelled trains #11

Closed
andrewjw opened this issue Feb 5, 2024 · 0 comments
Closed

Handle cancelled trains #11

andrewjw opened this issue Feb 5, 2024 · 0 comments

Comments

@andrewjw
Copy link
Owner

andrewjw commented Feb 5, 2024

----------------------------------------
Exception occurred during processing of request from ('192.168.1.36', 52493)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/socketserver.py", line 318, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/local/lib/python3.12/socketserver.py", line 349, in process_request
    self.finish_request(request, client_address)
  File "/usr/local/lib/python3.12/socketserver.py", line 362, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/lib/python3.12/socketserver.py", line 761, in __init__
    self.handle()
  File "/usr/local/lib/python3.12/http/server.py", line 436, in handle
    self.handle_one_request()
  File "/usr/local/lib/python3.12/http/server.py", line 424, in handle_one_request
    method()
  File "/display/smartdisplay/smart_display_handler.py", line 30, in do_GET
    data = self.trains_to_london()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/display/smartdisplay/smart_display_handler.py", line 132, in trains_to_london
    "trains": get_trains_to_london()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/display/smartdisplay/trains.py", line 64, in get_trains_to_london
    "is_late": _is_late(train.std, train.etd)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/display/smartdisplay/trains.py", line 106, in _is_late
    ehour, eminute = int(estimated.split(":")[0]), int(estimated.split(":")[1])
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'Cancelled'
----------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant