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

Strip spaces from meal classification #12

Closed
chk1 opened this issue Oct 28, 2019 · 2 comments · Fixed by #13
Closed

Strip spaces from meal classification #12

chk1 opened this issue Oct 28, 2019 · 2 comments · Fixed by #13
Labels

Comments

@chk1
Copy link
Owner

chk1 commented Oct 28, 2019

CI throws a (caught) error for Python 3.x tests:

Processing "mensa_steinfurt.xml" Conversion of "mensa_steinfurt.xml" failed: 'vgn '
Traceback (most recent call last):
  File "parser.py", line 208, in <module>
    status = StudentenwerkToOpenmensa(config.BASE_URL, config.OUT_DIR, config.USER_AGENT, filename)
  File "parser.py", line 152, in StudentenwerkToOpenmensa
    for foodicon in foodicons:
  File "parser.py", line 70, in <lambda>
    fis = map(lambda x: config.CLASSIFICATION[x.lower()], fis)
KeyError: 'vgn '

vgn should be vgn (without spaces) to match an item in the classification list

https://github.com/chk1/stw2openmensa/blob/master/config.py#L68

Code change somewhere here https://github.com/chk1/stw2openmensa/blob/master/parser.py#L69

@chk1 chk1 added the hacktoberfest easy fix label Oct 28, 2019
@gfranco93
Copy link
Contributor

Im on it

@chk1
Copy link
Owner Author

chk1 commented Oct 29, 2019

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants