-
-
Notifications
You must be signed in to change notification settings - Fork 274
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] 2022, 5 (Miami) Lap data #431
Comments
Working for me as of now:
|
Interesting. Still failing for me. Just tried without using the cache, and same result:
|
Failing for me as well. I'll only get around to look at this in one or two weeks. Sorry for that. |
I can reproduce this error in version 3.0.7. Seems related to #403 and 95d0186: Lines 440 to 448 in 95d0186
L445 wants to get the value of Below are one working example of {'Stats': {'0': {'TimeDiffToFastest': '+1.850', 'TimeDifftoPositionAhead': '+0.036'}}, 'BestLapTimes': {'0': {'Value': '1:32.085', 'Lap': 4}}, 'Line': 13, 'Position': '13', 'NumberOfLaps': 5, 'Sectors': {'2': {'Value': '25.934'}}, 'Speeds': {'FL': {'Value': '284'}}, 'BestLapTime': {'Value': '1:32.085', 'Lap': 4}, 'LastLapTime': {'Value': '1:32.085', 'PersonalFastest': True}}
{'BestLapTimes': {'0': {'Value': '1:31.647', 'Lap': 7}}, 'NumberOfLaps': 8, 'BestLapTime': {'Value': '1:31.647', 'Lap': 7}, 'LastLapTime': {'Value': '1:31.647', 'PersonalFastest': True}}
{'BestLapTimes': {'0': {'Value': '1:31.325', 'Lap': 9}}, 'NumberOfLaps': 10, 'BestLapTime': {'Value': '1:31.325', 'Lap': 9}, 'LastLapTime': {'Value': '1:31.325', 'PersonalFastest': True}} {'Stats': [{'TimeDiffToFastest': '', 'TimeDifftoPositionAhead': ''}, {'TimeDiffToFastest': '', 'TimeDifftoPositionAhead': ''}, {'TimeDiffToFastest': '', 'TimeDifftoPositionAhead': ''}], 'KnockedOut': False, 'Cutoff': True, 'BestLapTimes': [{'Value': ''}, {}, {}], 'Line': 20, 'Position': '20', 'ShowPosition': False, 'RacingNumber': '31', 'Retired': False, 'InPit': True, 'PitOut': False, 'Stopped': False, 'Status': 272, 'Sectors': [{'Stopped': False, 'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}, {'Stopped': False, 'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}, {'Stopped': False, 'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}], 'Speeds': {'I1': {'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}, 'I2': {'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}, 'FL': {'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}, 'ST': {'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': False}}, 'BestLapTime': {'Value': ''}, 'LastLapTime': {'Value': '', 'Status': 0, 'OverallFastest': False, 'PersonalFastest': True}} I don't know if this is the only case where L445-46 fail. If so, a dirty workaround would be checking |
This is great, many thanks: For anyone else having this problem, i edited line 445 of: #if val := recursive_dict_get(resp, 'BestLapTimes'):
if val == [{'Value': ''}, {}, {}]:
session_n = int(list(val.keys())[0])
if (session_n + 1) > len(session_split_times): And i get a dataframe back, so can continue - many thanks. |
Sorry I didn't make myself clear. We should always let the code run, unless if val := recursive_dict_get(resp, 'BestLapTimes'):
if val != [{'Value': ''}, {}, {}]:
session_n = int(list(val.keys())[0])
if (session_n + 1) > len(session_split_times):
session_split_times.append(to_timedelta(time)) This dirty fix may break stuff mentioned in #403. But as long as you are not working with fastest laps, it should be fine. |
Sorry that this took quite a bit longer than the predicted 1-2 weeks, even though it wasn't very difficult to fix in the end. |
Describe the issue:
version: 3.0.7
I'm not having difficulty with any other sessions (for 2022) Just this one
output of session.load()
Reproduce the code example:
Error message:
DataNotLoadedError: The data you are trying to access has not been loaded yet. See `Session.load
The text was updated successfully, but these errors were encountered: