You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the code scrape this into a string '168.33 57.9' which, when attempted to convert to float in
if "distance" in fields:
distances = table_parser.parse_extra_column("Distance", lambda x:
float(x) if x.split(".")[0].isnumeric() else None)
table_parser.extend_table("distance", distances)
in season_results(self, *args: str) of rider_scraper.py, results in conversion error.
Currently I'm thinking of fixing the issue in my project with something like
data = '168.33 57.9'.split(' ')[-1]
Or just modify it so it'd return string instead of float.
But I'm not very familiar with procyclingstats.com, so I'm not sure how frequent the data entered cross-out is, or if it will potentially also be done to fields elsewhere.
What do you think? I'm also interested to do a pull request, but i want to discuss the issue here first.
The text was updated successfully, but these errors were encountered:
Hello. I'm currently running into a bug while trying to use season_results()
ValueError: could not convert string to float: '168.33 57.9'
As of the date this issue is posted, I got the error after running this code.
After looking into the codebase and visiting the site the data is scraped from, I believe the problem is the way one of the data is entered in https://www.procyclingstats.com/rider/tadej-pogacar/
Particularly, this part:
I believe the code scrape this into a string '168.33 57.9' which, when attempted to convert to float in
in season_results(self, *args: str) of rider_scraper.py, results in conversion error.
Currently I'm thinking of fixing the issue in my project with something like
Or just modify it so it'd return string instead of float.
But I'm not very familiar with procyclingstats.com, so I'm not sure how frequent the data entered cross-out is, or if it will potentially also be done to fields elsewhere.
What do you think? I'm also interested to do a pull request, but i want to discuss the issue here first.
The text was updated successfully, but these errors were encountered: