Comments (11)
The easiest way to reproduce this is by removing a season from the db.
con <- DBI::dbConnect(RSQLite::SQLite(), "cfb_pbp_db")
DBI::dbExecute(con, glue::glue_sql("DELETE FROM `cfbfastR_pbp` WHERE season IN ({vals*})", vals = 2021, .con = con))
update_cfb_db(db_connection = con)
This results in the following output
The reason is that nflfastR's game_id
includes the relevant season which is not true for cfbfastR. Therefore the function complains about invalid input because 4012 or 4013 doesn't seem like valid cfb seasons (yet).
cfbfastR 1.5.2.9000 will fix this in #48
from cfbfastr.
I patched the issue above on my end, but now I also receive errors with the following command:
update_cfb_db_mod(
tblname = 'cfbfastR_pbp',
db_connection = con
)
Error: At least one invalid value passed to argument "force_rebuild". Please try again with valid input.
I think the issue comes in here:
if (length(missing) > 16) {
build_cfb_db(tblname,
connection,
show_message = FALSE,
rebuild = as.numeric(unique(stringr::str_sub(missing,
1, 4))))
missing <- get_missing_cfb_games(completed_games, connection,
tblname)
}
Is build_cfb_db
placing game_ids in the rebuild
variable?
from cfbfastr.
So I appreciate you doing all this and being detailed, investigating the code. There's things that just shouldn't be in there if we're being honest. I will try to create an update shortly addressing the issues you raise. I'm not feeling great about college football and so I have been negligent
from cfbfastr.
Please update to Rcpp 1.0.7 or higher, update cfbfastR and try now. I amended the data repo code so it shouldn't be an issue and confirm it is working for me please. Otherwise, I'll close in a few days
from cfbfastr.
Hi Saiem,
Apologies for re-opening - but this still isn't fixed on my end. Would it help if I listed the specs on my machine?
Still getting the same error: At least one invalid value passed to argument "force_rebuild". Please try again with valid input.
from cfbfastr.
cfbfastR::update_cfb_db(force_rebuild = c(2014:2020))
^ the above appears to work
cfbfastR::update_cfb_db(force_rebuild = TRUE)
also appears to work.
cfbfastR::update_cfb_db(force_rebuild = FALSE)
also appears to work
You are on cfbfastR version >= 1.5.2?
from cfbfastr.
Yes I am on 1.5.2. I am also on an ARM mac (M1 chip) if that might be causing any issues.
Still getting an error when I execute: cfbfastR::update_cfb_db(force_rebuild = FALSE)
Error:At least one invalid value passed to argument "force_rebuild". Please try again with valid input.
from cfbfastr.
If it helps, forcing rebuild of the db works just fine - but I believe this issue is a result of the numeric IDs being passed to build_cfb_db
. Currently I'm missing 76 games and getting the error I copied above.
Here's some more detail on the error, it looks like it's checking the database for missing games multiple times?
Checking for missing completed games...
You have 6083 games and are missing 76.
At least one invalid value passed to argument "force_rebuild". Please try again with valid input.
You have 6083 games and are missing 76.
from cfbfastr.
Huh. Thanks. I'm not going to close this issue, but I am glad it wasn't a wholesale failure for you at the moment. Curious what happens when you remove the dB and rebuild if it still gives you the error on missing games. Missing 76 games might sound right on the season. That's definitely bad behavior that I think I can correct with a version update
from cfbfastr.
If I rebuild entirely, it won't miss any games after rebuild. But next week when the games happen, it will give me same error when force_rebuild = FALSE
Is that what you're asking?
from cfbfastr.
Okay, yeah, I think that is helpful information. I am going to continue to investigate this. I did not implement this correctly and need to re-work it. Continue along with just rebuilding for the time being, and I do apologize for the inconvenience as we work to resolve it.
from cfbfastr.
Related Issues (20)
- CFBD Functions Return curl_fetch_memory error HOT 2
- `espn_ratings_fpi` not in CRAN install HOT 2
- cfbd_drives contains different number of columns for years 2020 and 2021
- Request Failed [500] -> 2021 Data HOT 4
- cfbd_game_team_stats importing as list HOT 2
- EPA on Punt plays looks broken HOT 1
- espn_ratings_fpi not found HOT 2
- Can't load betting lines HOT 1
- cfpd_pbp_data cannot load 2021 week 12 pbp data HOT 2
- Inconsistent formatting of data returned by `cfbd_game_team_stats()` HOT 3
- Incorrect values recorded for drive points HOT 2
- R: cfbd_game_player_stats giving 400 error HOT 1
- cfbd_game_weather HOT 5
- cfbd_game_player_stats columns are lists instead of numeric HOT 2
- cfbd_player_usage(2022,NULL,NULL,NULL,player_id,FALSE)
- cfbd_game_team_stats is requiring the "team" argument. HOT 2
- Add rows_per_team argument to the cfbd_stats_game_advanced endpoint on CFBD HOT 1
- Change object returned for empty cfbd_stats_game_advanced response HOT 1
- cfbd_betting_lines HOT 4
- cfb_pbp_data() only returning 56 variables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cfbfastr.