joenano / rpscrape

Scrape horse racing results data and racecards.
140 stars 57 forks source link

Racecards - IndexError: list index out of range #64

Closed patem2 closed 3 years ago

patem2 commented 3 years ago

Hi,

I think there is an issue with the rail movements / going element of the racecards module, when trying to run the module today (07/09/2021) I get the following error:

Traceback (most recent call last): File "./racecards.py", line 412, in main() File "./racecards.py", line 402, in main races = parse_races(session, race_docs, date) File "./racecards.py", line 264, in parse_races going_info = get_going_info(session, date) File "./racecards.py", line 62, in get_going_info going, rail_movements = parse_going(course['going']) File "./racecards.py", line 255, in parse_going rail_movements = [x.strip() for x in going_info.split('Rail movements:')[1].strip().strip(')').split(',')] IndexError: list index out of range

The strange thing is when I try tried to run if for tomorrow (08/09/2021) it seems to work fine?

Any assistance would be greatly appreciated.

Best wishes

joenano commented 3 years ago

this was fixed in latest version

patem2 commented 3 years ago

Excellent thanks :-)