jflancer / bigballR

Package for working with NCAA Basketball Data
Other
61 stars 19 forks source link

Error with 12/11 pull #28

Closed rflynn21 closed 2 years ago

rflynn21 commented 2 years ago

Not sure if this is something I am doing that is fixable, but this is what I am inputting:

bigballR::get_date_games(date = as.character(format(Sys.Date() - 2, "%m/%d/%Y")))

And this is the output/error:

12/11/2021 | 105 games found
==============================================================Error in game_data$GameID[i] <- new_id : replacement has length zero

This has worked with any other date I am trying to pull for, but it's throwing an error on the 12/11 pull for some reason. The only part I have changed from the default code is that I changed the default date (Sys.Date() - 1) to the specific date I want, in this case, instead of yesterday's date, I wanted two days ago.

Seems to keep getting snagged on a certain GameID? Any known way of getting around this?

Thank you!! `

rflynn21 commented 2 years ago

Any update here? For some more context, it breaks at the exact same progression point each time, meaning it seems there's a broken GameID value somewhere, and the underlying code isn't handling it. Curious if anyone else has had this issue or if there's any fix.

evanmiyakawa commented 2 years ago

To test for 12/11/2021, I tested this with bigballR::get_date_games(date = as.character(format(Sys.Date() - 4, "%m/%d/%Y"))), and it worked as expected. Did you install the latest version of bigballR from Github?

rflynn21 commented 2 years ago

Thought it might've been that I didn't have the version which included the updates, but I did update it twice... even had to force installation the second time.

Of course though, just tried again, and it worked as expected... so weird. Was trying everything for the past couple of days and kept hitting the same error. Must've been some local issue, so I'll go ahead and close this.

Thanks, Evan!