When trying to pull todays race card the following error is generated under parse_races:
File "./racecards.py", line 401, in
main()
File "./racecards.py", line 391, in main
races = parse_races(session, race_docs, date)
File "./racecards.py", line 253, in parse_races
race['age_band'] = band[0]
IndexError: list index out of range
When pulling 2021 stats using GB 2021 flat as an example, the following additional index error was presented:
Traceback (most recent call last):
File "rpscrape.py", line 149, in
main()
File "rpscrape.py", line 145, in main
scrape_races(races, args['folder_name'], args['file_name'], args['type'])
File "rpscrape.py", line 93, in scrape_races
race = Race(doc, code, settings.fields)
File "C:\Users\markp\rpscrape\scripts\utils\race.py", line 69, in init
self.runner_info['pos'] = self.get_positions()
File "C:\Users\markp\rpscrape\scripts\utils\race.py", line 475, in get_positions
if positions[0] == 'VOI':
IndexError: list index out of range
Hi,
When trying to pull todays race card the following error is generated under parse_races:
File "./racecards.py", line 401, in
main()
File "./racecards.py", line 391, in main
races = parse_races(session, race_docs, date)
File "./racecards.py", line 253, in parse_races
race['age_band'] = band[0]
IndexError: list index out of range
Best wishes