Skip to content
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] No errors being thrown when accessing empty data from get_driver() #668

Open
Carol52x opened this issue Dec 18, 2024 · 0 comments
Open

Comments

@Carol52x
Copy link

Carol52x commented Dec 18, 2024

Describe the issue:

For the 2018 season and first 6 races of 2019 (could also happen in other seasons i believe, haven't checked though), livetiming api doesn't support keys Reference, CountryCode and HeadshotUrl. When accessing these from session.get_driver(), nothing happens because these keys exist but their values are empty. I think it's beneficial to raise an exception when these are accessed, or have a fallback source to populate these keys instead.

Reproduce the code example:

session = fastf1.get_session(2018, 21, 5)
print(session.get_driver("HAM"))
print(session.get_driver("HAM")['HeadshotUrl'])

Error message:

DriverNumber                              44
BroadcastName                     L HAMILTON
Abbreviation                             HAM
DriverId                            hamilton
TeamName                            Mercedes
TeamColor                             00D2BE
TeamId                              mercedes
FirstName                              Lewis
LastName                            Hamilton
FullName                      Lewis Hamilton
HeadshotUrl
CountryCode
Position                                 1.0
ClassifiedPosition                         1
GridPosition                             1.0
Q1                                       NaT
Q2                                       NaT
Q3                                       NaT
Time                  0 days 01:39:40.382000
Status                              Finished
Points                                  25.0

*No output*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant