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

Make reading the menu not fail when a new station is added. #1

Open
BenJetson opened this issue Dec 3, 2018 · 0 comments
Open

Make reading the menu not fail when a new station is added. #1

BenJetson opened this issue Dec 3, 2018 · 0 comments

Comments

@BenJetson
Copy link
Owner

Currently, if an unrecognized station (not in VALUE_MATRIX) is found, an error occurs and Alexa says there was a problem.

Relevant log from CloudWatch:

'Theme Meal': KeyError
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 98, in lambda_handler
speech = on_intent(event["request"], event["session"])
File "/var/task/lambda_function.py", line 33, in on_intent
stations = parse_stations(page)
File "/var/task/dining.py", line 194, in parse_stations
stations.append(Station(name, items))
File "/var/task/dining.py", line 58, in __init__
self.value = Station.VALUE_MATRIX[name.strip()]
KeyError: 'Theme Meal'
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