Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error pulling down today's racecards #126

Closed
WaspStar opened this issue Nov 1, 2022 · 6 comments
Closed

Error pulling down today's racecards #126

WaspStar opened this issue Nov 1, 2022 · 6 comments

Comments

@WaspStar
Copy link

WaspStar commented Nov 1, 2022

This has just started today. When I try to pull down today's racecards using the command, "racecards.py today", I'm getting the following errors (note: racecards.py tomorrow is working fine at the moment)

Traceback (most recent call last):
File "C:\rpscrape\scripts\racecards.py", line 459, in
main()
File "C:\rpscrape\scripts\racecards.py", line 449, in main
races = parse_races(session, race_urls, date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\rpscrape\scripts\racecards.py", line 296, in parse_races
race['distance_f'] = distance_to_furlongs(race['distance_round'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\rpscrape\scripts\racecards.py", line 39, in distance_to_furlongs
return float(dist)
^^^^^^^^^^^
ValueError: could not convert string to float: ''

Thanks!

@WaspStar WaspStar changed the title Erro Error pulling down today's racecards Nov 1, 2022
@rmwesley99
Copy link

It is normally just a transient issue with incorrectly formatted HTML on the RP website (he says trying to sound like he knows what he is talking about). Today's race card attached from when it was working yesterday. Just rename from a TXT to a JSON file.
2022-11-01.txt

@joenano
Copy link
Owner

joenano commented Nov 1, 2022

Its the flemington races, having a look just now.

Links seem to be forwarding to the result page instead of the racecard.

@WaspStar
Copy link
Author

WaspStar commented Nov 1, 2022

Thank you @rmwesley99 @joenano

@joenano
Copy link
Owner

joenano commented Nov 1, 2022

Should be fixed in latest.

@WaspStar
Copy link
Author

WaspStar commented Nov 1, 2022

Thank you @joenano - works perfectly after an upgrade.

Just for info, when I do an upgrade, it definitely works, but I get the message, "Failed to update" afterwards.

@WaspStar WaspStar closed this as completed Nov 1, 2022
@joenano
Copy link
Owner

joenano commented Nov 1, 2022

Just for info, when I do an upgrade, it definitely works, but I get the message, "Failed to update" afterwards.

this is very annoying to test, seems to work for some and not for others, you can turn off auto update in settings and git pull manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants