SCasanova / f1dataR

An R package to access Formula 1 Data from the Ergast API and the unofficial F1 data stream via the fastf1 python library.
https://scasanova.github.io/f1dataR/
Other
51 stars 5 forks source link

Errors in recent auto-checks #258

Closed pbulsink closed 2 weeks ago

pbulsink commented 2 months ago

Two errors have popped up this month in auto-checks.

The first has to do with old versions of fastf1 when cache clearing - not a high priority.

The second is a much harder failure across the board for all fastf1-related functions.

 Error in `py_run_string_impl(code, local, convert)`: KeyError: 'DriverNumber'
pbulsink commented 2 months ago

It might be a problem with our randomly selected race that is used for testing.

> f1dataR:::load_race_session()  # Uses 2024 Bahrain Race - returns invisible successfully

> f1dataR:::load_race_session(season = 2022, round = 1))
logger      WARNING     Failed to load session info data!
core        WARNING     Failed to load extended driver information!
Error in py_run_string_impl(code, local, convert) : 
  KeyError: 'DriverNumber'
Run `reticulate::py_last_error()` for details.

> f1dataR:::load_race_session(season = 2023, round = 1))  # Returns invisible successfully
pbulsink commented 2 months ago

Apparently affects all 2022 data (see the referenced discussion in the above bug report at FastF1). At this point I think we wait until either CRAN gets upset that the tests fail, or the data goes back to normal for 2022.

pbulsink commented 1 month ago

There's no evident fix coming from Formula 1 for the old data so I might update the tests to a more recent year to build correctly. This will end up being a blocking issue if code changes can't pass tests.

pbulsink commented 1 month ago

This may be fixed in FastF1 v3.4.0 per https://github.com/theOehrly/Fast-F1/issues/607

pbulsink commented 1 month ago

This may be fixed in FastF1 v3.4.0 per theOehrly/Fast-F1#607

fixed, but artificially - FastF1 has a self-hosted server that serves as an invisible backup for Formula1 API failures. Should we still migrate to a 'real' Formula1-served results?