Git Product home page Git Product logo

Comments (11)

mrcaseb avatar mrcaseb commented on August 23, 2024 1

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

grafik

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

grafik

from cfbfastr.

Colinifer avatar Colinifer commented on August 23, 2024

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.

saiemgilani avatar saiemgilani commented on August 23, 2024

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.

saiemgilani avatar saiemgilani commented on August 23, 2024

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.

Colinifer avatar Colinifer commented on August 23, 2024

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.

saiemgilani avatar saiemgilani commented on August 23, 2024

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.

Colinifer avatar Colinifer commented on August 23, 2024

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.

Colinifer avatar Colinifer commented on August 23, 2024

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.

saiemgilani avatar saiemgilani commented on August 23, 2024

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.

Colinifer avatar Colinifer commented on August 23, 2024

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.

saiemgilani avatar saiemgilani commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.