Skip to content

get_car_data() 2021-Yeda-Race-Verstappen-37 #519

Answered by theOehrly
formulatimer asked this question in Q&A
Discussion options

You must be logged in to vote

Your issue is that you are using .pick_fastest() after you pick the lap number. By default, .pick_fastest() will only return laps that are marked as personal best laps (i.e. they were faster than any previous lap and not deleted). Because lap 37 is not a personal best lap for VER, no lap is returned here. Therefore, you are then trying to get the telemetry of no lap which of course returns no data.
In short, remove the additional .pick_fastest() call and everything will work.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@formulatimer
Comment options

@theOehrly
Comment options

@formulatimer
Comment options

@theOehrly
Comment options

Answer selected by formulatimer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants