[PR #226] Fix/fastf1 telemetry guards #233

Open
opened 2026-05-07 00:19:19 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/226
Author: @PabbisettySivaKumar
Created: 2/13/2026
Status: 🔄 Open

Base: mainHead: fix/fastf1-telemetry-guards


📝 Commits (2)

  • ddf2b1b Handled unsuppoeted FastF1 telemetry and add defensive telemetry guards for unsupported/partial history
  • 58ec9c4 Remove local editor config files from PR

📊 Changes

2 files changed (+142 additions, -55 deletions)

View changed files

📝 src/f1_data.py (+125 -46)
📝 src/gui/race_selection.py (+17 -9)

📄 Description

Summary

  • Harden telemetry extraction in src/f1_data.py to prevent multiprocessing crashes on partially supported FastF1 sessions.
  • Add defensive handling for unsupported/historical sessions where lap or position telemetry is unavailable, returning clear user-facing errors instead of stack traces.
  • Guard per-lap telemetry parsing against malformed/missing data (DataNotLoadedError, KeyError, and empty-sequence ValueError) so problematic laps are skipped safely.
  • Update src/gui/race_selection.py with PySide6-compatible enum usage and small type-safety fixes for cleaner static analysis and safer UI handling.

Why

Some race sessions (especially older or partially supported seasons) caused replay generation to fail due to unhandled telemetry edge cases in worker processes.
This change makes replay loading resilient and improves failure behavior for unsupported data scenarios.

Test plan

  • Run python main.py with a modern session (e.g. 2024/2025) and verify telemetry extraction completes normally.
  • Run an unsupported historical session (e.g. 2010 R1) and verify a clear error is shown instead of worker traceback crashes.
  • Run a partially supported session (e.g. 2018/2020 edge cases) and verify no multiprocessing crash during lap telemetry extraction.
  • Verify GUI session selection flow still works and no regressions in launching race/qualifying playback.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/IAmTomShaw/f1-race-replay/pull/226 **Author:** [@PabbisettySivaKumar](https://github.com/PabbisettySivaKumar) **Created:** 2/13/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/fastf1-telemetry-guards` --- ### 📝 Commits (2) - [`ddf2b1b`](https://github.com/IAmTomShaw/f1-race-replay/commit/ddf2b1bbdc2640eddb54726c4605a456f6699554) Handled unsuppoeted FastF1 telemetry and add defensive telemetry guards for unsupported/partial history - [`58ec9c4`](https://github.com/IAmTomShaw/f1-race-replay/commit/58ec9c4609ea97495fc86c3d89562702b16de4dd) Remove local editor config files from PR ### 📊 Changes **2 files changed** (+142 additions, -55 deletions) <details> <summary>View changed files</summary> 📝 `src/f1_data.py` (+125 -46) 📝 `src/gui/race_selection.py` (+17 -9) </details> ### 📄 Description ## Summary - Harden telemetry extraction in `src/f1_data.py` to prevent multiprocessing crashes on partially supported FastF1 sessions. - Add defensive handling for unsupported/historical sessions where lap or position telemetry is unavailable, returning clear user-facing errors instead of stack traces. - Guard per-lap telemetry parsing against malformed/missing data (`DataNotLoadedError`, `KeyError`, and empty-sequence `ValueError`) so problematic laps are skipped safely. - Update `src/gui/race_selection.py` with PySide6-compatible enum usage and small type-safety fixes for cleaner static analysis and safer UI handling. ## Why Some race sessions (especially older or partially supported seasons) caused replay generation to fail due to unhandled telemetry edge cases in worker processes. This change makes replay loading resilient and improves failure behavior for unsupported data scenarios. ## Test plan - Run `python main.py` with a modern session (e.g. 2024/2025) and verify telemetry extraction completes normally. - Run an unsupported historical session (e.g. 2010 R1) and verify a clear error is shown instead of worker traceback crashes. - Run a partially supported session (e.g. 2018/2020 edge cases) and verify no multiprocessing crash during lap telemetry extraction. - Verify GUI session selection flow still works and no regressions in launching race/qualifying playback. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/f1-race-replay#233
No description provided.