theOehrly / Fast-F1

FastF1 is a python package for accessing and analyzing Formula 1 results, schedules, timing data and telemetry
https://docs.fastf1.dev
MIT License
2.29k stars 239 forks source link

[BUG] Missing data in 2024 Sprint Qualifying #597

Closed babi00 closed 3 weeks ago

babi00 commented 1 month ago

Describe the issue:

In 2024 Sprint Qualifying Sessions Q1, Q2 and Q3 times are missing. Could you please add them?

Reproduce the code example:

session=fastf1.get_session(2024,"Miami","Sprint Qualifying")
session.load()
session.results

Error message:

No response

Casper-Guo commented 1 month ago

See if this does what you want: split_qualifying_sessions

babi00 commented 1 month ago

See if this does what you want: split_qualifying_sessions

No, I meant that session.results["Q1"] (the same goes for Q2 and Q3) are filled with NaT values intead of the actual qualifying times (as it is, for example, in the qualifying session from fastf1.get_session(2024,"Miami","Q")

theOehrly commented 1 month ago

@babi00 please make sure you are using the latest version of FastF1. If you are using pip, run pip install --upgrade fastf1 to update. This should no longer be an issue in the most recent version.

babi00 commented 1 month ago

@babi00 please make sure you are using the latest version of FastF1. If you are using pip, run pip install --upgrade fastf1 to update. This should no longer be an issue in the most recent version.

It says that I already have the latest version (3.3.7, right?). I don't understand if somehow it's just a problem for me or if it is a data's issue.

theOehrly commented 1 month ago

@babi00 I am currently on vacation without any computer. So I cannot diagnose really. You can try and delete the whole content of the cache directory. FastF1 should print the path to your cache folder every time you run any script. Maybe this resolves the problem. Else, I can't help you any more before next week.

Edit: yes, v3.3.7 is the current version

Carol52x commented 1 month ago

This is most likely related to #364 as Ergast as of now does not support both sprint shootout (2023) and sprint qualifying results.

Code example: (3.3.7)

session=fastf1.get_session(2024,"Miami","Sprint Qualifying")
session.load()
print(session.results)

Output: image

On another note, Ergast has miscalculated WCC points for Mercedes (should be 96 instead of 160) so the data from that API may be unreliable: image

theOehrly commented 3 weeks ago

@MyosotisLz is correct that Ergast does not support the Sprint Qualifying. But a large part of the data (including the Q1/2/3 times) should be calculated from the timing data as a fallback.

There was a problem where the renamed "Sprint Qualifying" this year wasn't correctly handled as a session that has qualifying format. There is/was a naming conflict because "Sprint Qualifying" already existed in 2021, but back then it was a session with race format. I've fixed this now to properly differentiate by year, and now the results will be available via the fallback mechanism.

babi00 commented 3 weeks ago

@MyosotisLz is correct that Ergast does not support the Sprint Qualifying. But a large part of the data (including the Q1/2/3 times) should be calculated from the timing data as a fallback.

There was a problem where the renamed "Sprint Qualifying" this year wasn't correctly handled as a session that has qualifying format. There is/was a naming conflict because "Sprint Qualifying" already existed in 2021, but back then it was a session with race format. I've fixed this now to properly differentiate by year, and now the results will be available via the fallback mechanism.

I'm sorry but I don't understand how can I can now access to Q1/Q2/Q3 times. I've installed the upgraded version but still didn't find a way. What do you mean with "fallback mechanism"?

theOehrly commented 3 weeks ago

@babi00 you don't need to do anything. If you have updated to v3.3.8, the Q1/2/3 times are now simply available in the results.

The fallback is just an internal thing that you don't need to worry about. I just wanted to mention it because obviously the data in question is not available on Ergast for this session.

babi00 commented 3 weeks ago

@theOehrly I'm very sorry but even if I had imported again fastf1 it didn't get the changes. I've restarted the kernel and now everything works, so I'm sorry but clearly I was just dumb. Thank you!