joenano / rpscrape

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

NoneType' object has no attribute 'strip #109

Closed patem2 closed 2 years ago

patem2 commented 2 years ago

Hi,

When trying to execute the racecards.py programme is seems to be displaying the following error for the today variables for both yesterday and today.

I tried the tomorrow variable yesterday which didn't work (which makes sense when the today variable doesn't wok today), however when trying the tomorrow variable today it seems to work again (2022/03/10)

Traceback (most recent call last): File "racecards.py", line 437, in main() File "racecards.py", line 427, in main races = parse_races(session, race_urls, date) File "racecards.py", line 327, in parse_races runners = get_runners(session, profile_urls) File "racecards.py", line 147, in get_runners runner['grandsire'] = clean_name(js['profile']['siresSireName']) File "racecards.py", line 22, in clean_name return name.strip().replace("'", '').lower().title() AttributeError: 'NoneType' object has no attribute 'strip'

Best wishes Mark

joenano commented 2 years ago

should be sorted now

patem2 commented 2 years ago

Thanks bud