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'm running into an issue when I try to run a script with the following code:
AL_East <- bref_standings_on_date(Sys.Date(), division = "AL East", from = FALSE)
AL_Central <- bref_standings_on_date(Sys.Date(), division = "AL Central", from = FALSE)
AL_West <- bref_standings_on_date(Sys.Date(), division = "AL West", from = FALSE)
NL_East <- bref_standings_on_date(Sys.Date(), division = "NL East", from = FALSE)
NL_Central <- bref_standings_on_date(Sys.Date(), division = "NL Central", from = FALSE)
NL_West <- bref_standings_on_date(Sys.Date(), division = "NL West", from = FALSE)
When trying to run this code I get the following error
2024-06-29 10:34:08.684472: Invalid arguments or no standings on date data available!
Error in bref_standings_on_date(Sys.Date(), division = "NL East", from = FALSE) :
object 'x' not found
If I try running the script again I get:
2024-06-29 10:34:08.684472: Invalid arguments or no standings on date data available!
Error in bref_standings_on_date(Sys.Date(), division = "AL East", from = FALSE) :
object 'x' not found
I tried the code on the postit.cloud interface and it seemed to work fine. So I uninstalled baseballr and reinstalled it. Made sure my R/Rstudio were both up to date(they were). Still didn't work.
So then I went into the bref_standings_on_date function and tried running it step by step to see where I was getting hung up. Turns out I was getting this error:
Error in open.connection(x, "rb") : HTTP error 429
I don't consider myself too knowledgeable about these things, but it seems that code means I'm getting rate limited by Baseball ref. I've run this script with this block of code every morning of the baseball season for the last 2.5 years. Any idea why I'm starting to get rate limited now? I only run it in the morning, so it's not like I'm running it all the time.
I understand I can add a Sys.sleep() inbetween each one to help with not getting rate limited. What is a good amount of time to put in the Sys.sleep so baseball ref doesn't get mad at me. Is there a better way to go about doing this?
Running macOS 13.6.3, R 4.4.1, Rstudio 2024.04.2+764.
Any tips would be appreciated, Thanks!
The text was updated successfully, but these errors were encountered:
I have the exact same issue. Does anyone have a solution? Also happens with standings_on_date_bref. I run the example code lines from the website and they all crash with "Error in standings_on_date_bref(todays_date, this_div, from = FALSE) :
object 'x' not found"
I'm running into an issue when I try to run a script with the following code:
AL_East <- bref_standings_on_date(Sys.Date(), division = "AL East", from = FALSE)
AL_Central <- bref_standings_on_date(Sys.Date(), division = "AL Central", from = FALSE)
AL_West <- bref_standings_on_date(Sys.Date(), division = "AL West", from = FALSE)
NL_East <- bref_standings_on_date(Sys.Date(), division = "NL East", from = FALSE)
NL_Central <- bref_standings_on_date(Sys.Date(), division = "NL Central", from = FALSE)
NL_West <- bref_standings_on_date(Sys.Date(), division = "NL West", from = FALSE)
When trying to run this code I get the following error
2024-06-29 10:34:08.684472: Invalid arguments or no standings on date data available!
Error in bref_standings_on_date(Sys.Date(), division = "NL East", from = FALSE) :
object 'x' not found
If I try running the script again I get:
2024-06-29 10:34:08.684472: Invalid arguments or no standings on date data available!
Error in bref_standings_on_date(Sys.Date(), division = "AL East", from = FALSE) :
object 'x' not found
I tried the code on the postit.cloud interface and it seemed to work fine. So I uninstalled baseballr and reinstalled it. Made sure my R/Rstudio were both up to date(they were). Still didn't work.
So then I went into the bref_standings_on_date function and tried running it step by step to see where I was getting hung up. Turns out I was getting this error:
Error in open.connection(x, "rb") : HTTP error 429
I don't consider myself too knowledgeable about these things, but it seems that code means I'm getting rate limited by Baseball ref. I've run this script with this block of code every morning of the baseball season for the last 2.5 years. Any idea why I'm starting to get rate limited now? I only run it in the morning, so it's not like I'm running it all the time.
I understand I can add a Sys.sleep() inbetween each one to help with not getting rate limited. What is a good amount of time to put in the Sys.sleep so baseball ref doesn't get mad at me. Is there a better way to go about doing this?
Running macOS 13.6.3, R 4.4.1, Rstudio 2024.04.2+764.
Any tips would be appreciated, Thanks!
The text was updated successfully, but these errors were encountered: