data_logger stops with a traceback if its CSV is open in Excel

Open
#263 0 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 3 days

@jmacd867 is already working on this.

Since Oct 30, 2026.

Assessment

This issue has not been assessed yet.

Description

area:ml bug needs-triage python

Describe the bug

data_logger reopens its CSV for every row (append_row, inference/pilot_inference/capture/data_logger.py:126). Excel locks a CSV it has open against other writers, so if someone opens the session file in Excel during a flight to check that rows are arriving, the next open() raises PermissionError. serve only catches ConnectionError (data_logger.py:177), so the logger stops with a traceback and every later sample is lost.

Found while advising how to watch the CSV during the lab setup session on 2026-10-29; it was not actually triggered. Opening the file in Excel is the first thing most people will try.

Expected behavior

A locked file does not end the recording. Either keep the rows in memory and retry each write, printing once that the file is locked and must be closed, or at the least stop with a one-line message naming the file instead of a traceback.

Additional context

inference/README.md could also say how to watch rows arrive without locking the file: Get-Content <csv> -Wait -Tail 5 in PowerShell.

Dominant language
Python
Stars
4
Forks
9
Avg merge
4d 17h
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oss-slu/PilotDataSynchronization

All issues in oss-slu/PilotDataSynchronization

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.