Closed COM8 closed 6 years ago
can you please briefly describe for which menu/dish the error occurred? Just so that I understand the fix :)
Updated The description.
running it for mensa-leopoldstr does not produce the error on my machine. Did they maybe fix the webpage?
I've pulled the latest version of your parse and it still results in mensa-leopoldstr, mensa-arcisstr, stubistro-rosenheim
throwing errors.
Well this is one of the situations where have empty cells in the first column:
This if condition
https://github.com/srehwald/eat-api/pull/13/commits/17cf971bb81ab8ec6531dfa96250af8a033a8944#diff-bb2fc7cfe5a6a3d58ae2a97a2733be7aL138
is intended to use the price of the previous row (here Mensa Spezial
of Bauerneintopf mit Rindfleisch (GQB)
) if the price column is empty. So the index error means that dishes is empty. So the correct question is, why it fails to parse the row Mensa Spezial
Bauerneintopf mit Rindfleisch (GQB)
before?
I'm convinced.
The program tries to access the last index of the
dishes
array although it's empty.Which canteens produce this error:
stubistro-rosenheim mensa-leopoldstr mensa-arcisstrasse mensa-arcisstr
Which menu/dish produces this error (one example):
The dishes "Rahmchampignons" and "Semmelknödel" produce it for Tuesday 23.01.2018. (link to the menu).
Help/Test code:
Just replace line 137 to 146 with the following code snipped. It will output all dishes, that cause this problem.
Exception: