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

Crash during scraping #12

Closed
Sherlock92 opened this issue Apr 23, 2019 · 3 comments
Closed

Crash during scraping #12

Sherlock92 opened this issue Apr 23, 2019 · 3 comments

Comments

@Sherlock92
Copy link

Thanks for the great library, just wanted to report a crash I came across:

Traceback (most recent call last):
  File "rpscrape.py", line 586, in <module>
    main()
  File "rpscrape.py", line 582, in main
    parse_args([arg.strip() for arg in args.split()])
  File "rpscrape.py", line 563, in parse_args
    scrape_races(races, course_name(scrape_target), args[1], code)
  File "rpscrape.py", line 488, in scrape_races
    times = calculate_times(win_time, btn, going, code, course_name)
  File "rpscrape.py", line 359, in calculate_times
    time = (win_time + (float(dist) / lps_scale))
UnboundLocalError: local variable 'lps_scale' referenced before assignment

Which I saw after running the script with these arguments: gb 1999-2019 flat

@joenano
Copy link
Owner

joenano commented Apr 24, 2019

What was the last race in the recorded data

@Sherlock92
Copy link
Author

Sherlock92 commented Apr 24, 2019

Looks like it was 1999-04-27,Bath,3:30,Tote Fillies' Stakes Showcase Handicap

I think it had been running for about half an hour leading up to it.

@joenano
Copy link
Owner

joenano commented Apr 24, 2019

Had an idea as soon as I saw Bath that I had forgot to add the old going description 'hard'.

Fixed

@joenano joenano closed this as completed Apr 24, 2019
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

2 participants