martbhell / wasthereannhlgamelastnight

:calendar: A YES/NO app to show the answer to: Was There An NHL Game Yesterday ?
https://wtangy.se
MIT License
3 stars 0 forks source link

Exception when schedule is empty #144

Closed martbhell closed 1 month ago

martbhell commented 1 month ago

"textPayload": "Exception on /update_schedule [GET]\nTraceback (most recent call last):\n File \"/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py\", line 1473, in wsgi_app\n response = self.full_dispatch_request()\n File \"/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py\", line 882, in full_dispatch_request\n rv = self.handle_user_exception(e)\n File \"/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py\", line 880, in full_dispatch_request\n rv = self.dispatch_request()\n File \"/layers/google.python.pip/pip/lib/python3.10/site-packages/flask/app.py\", line 865, in dispatch_request\n return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]\n File \"/workspace/main.py\", line 144, in update_schedule\n content = fetch_schedule_ahead(jsondata, url, schedule_date)\n File \"/workspace/main.py\", line 540, in fetch_schedule_ahead\n teamdates = parse_schedule(now_initial_jsondata)\n File \"/workspace/main.py\", line 610, in parse_schedule\n twoteams_sorted = sorted(twoteams)\nTypeError: '<' not supported between instances of 'NoneType' and 'str'", "insertId": "1vzac9vf4p4y3n", "httpRequest": { "requestMethod": "GET", "requestUrl": "http://wasthereannhlgamelastnight.appspot.com/update_schedule?cron",

martbhell commented 1 month ago

Fixing in #145

None came from a team not being recognized. Utah and MUN :)