benjmor / tabroom_auto_summarize

Generates AI-powered summaries of meets from tabroom.com data
3 stars 1 forks source link

keyerror in get_speech_results_from_final_places #34

Closed benjmor closed 8 months ago

benjmor commented 8 months ago
{'tournament': '27974', 'school': 'fuller', 'read_only': 'true'}Copy | {'tournament': '27974', 'school': 'fuller', 'read_only': 'true'} -- | --   | 2024-02-29T18:40:13.251-08:00[ERROR] 2024-03-01T02:40:13.251Z 145526fd-cb91-4d9a-9280-3dae78b15643 No results found for event Novice Congress in the rounds only mode, skipping.Copy | [ERROR] 2024-03-01T02:40:13.251Z 145526fd-cb91-4d9a-9280-3dae78b15643 No results found for event Novice Congress in the rounds only mode, skipping.   | 2024-02-29T18:40:13.253-08:00[ERROR] KeyError: 'value'Traceback (most recent call last):  File "/var/task/main.py", line 38, in handler    response = tabroom_summary.main(  File "/var/task/tabroom_summary/tabroom_summary.py", line 154, in main    ) = parse_result_sets(  File "/var/task/tabroom_summary/parse_result_sets.py", line 49, in parse_result_sets    tournament_results = get_speech_results_from_final_places(  File "/var/task/tabroom_summary/get_speech_results_from_final_places.py", line 54, in get_speech_results_from_final_places    ranks_by_round = value["value"]
benjmor commented 8 months ago

So, what was happening here?

Event was Middle School Impromptu Speaking: https://www.tabroom.com/index/tourn/results/event_results.mhtml?tourn_id=27974&result_id=283299

2 students presumably no-showed and got total ranks of zero. The no-show also meant they didn't have any results, so the attempt to grab the results failed.

Adding a simple try/catch for cases where value is not present.