-
-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Daniel Ricciardo incorrectly present in 2024 Japanese Grand Prix Practice 1 #680
Comments
Looks to me like this bug is because Ergast is returning incorrect data. Daniel Riccardo is not in the F1 API drivers list but is in the Ergast drivers list. Correspondingly Iwasa is missing from the Ergast data return. And then we have this logic for handling when the two sources disagree:
But Ergast actually do not provide the correct drivers for FP1 since it only has data for the actual grand prix.
So this is actually a much wider issue with reserve drivers taking part in FP1. If you try doing this with most Abu Dhabi GPs' FP1s, your results will contain more than 20 drivers. We probably need to be a lot more careful about pulling in drivers from Ergast. |
This might be fairly straightforward to fix. Right now, we pull driver information for practice sessions from the race endpoint on Ergast, because there is no practice data on Ergast. |
I am prepping a PR for this and would prefer to include tests. I tried to find recent examples of drivers DNS but in those cases the drivers are in the F1 API data as well. Do you remember any example that utilizes the pulling additional information from Ergast logic? |
I'll check later for an example. |
Oliver Bearman in 2024 Saudi Arabian GP Practice 1 and 2. # Parameters
year = 2024
grand_prix = 2
session = 1 # or 2
# Load session data
session = fastf1.get_session(year, grand_prix, session)
session.load() Best to look for situations where another driver took over driving duties mid-weekend. |
This isn't what I was originally looking for but it helped me catch another regression haha. Thanks for flagging it! |
Describe the issue:
Daniel Ricciardo didnt take part in the 2024 Japanese Grand Prix Practice 1 session; the driver is shown when fetching the session's results.
https://www.formula1.com/en/results/2024/races/1232/japan/practice/1
Reproduce the code example:
Error message:
The text was updated successfully, but these errors were encountered: