Repository navigation
Report images missing from a VIAME CSV import instead of crashing - #2032
Merged
Merged
Conversation
An image absent from the middle of the sequence raised KeyError on the server and left undefined frames on desktop. Both now skip those detections and warn with the image names; the server wrapper reports KeyError/IndexError as a parse failure.
BryonLewis
approved these changes
Nov 2, 2026
BryonLewis
left a comment
Collaborator
There was a problem hiding this comment.
If we are okay with now having missing images I think this PR is okay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A user reported a VIAME CSV that "failed to import" with an unclear error. When the CSV names an image that is absent from the middle of the dataset's image sequence, the server parser indexed its frame map with a frame that has no entry and raised a bare
KeyError. The import wrapper only recognizesValueErroras a parse failure, so the user saw:where
500is the CSV frame of the first detection on the missing image. The desktop parser did not throw but left those detections with anundefinedframe.Changes
Server and desktop parsers: a feature whose CSV frame has no mapping is skipped, whether it falls outside the found range or in a gap inside it. Track
begin/endare recomputed from the retained features. A warning is placed first in the list, naming the missing images and how many detections were skipped:When none of the named images match, the import keeps the CSV frame numbers (as before) and now says so with the same name hint. A blank image column produces no warning.
Import wrapper (
crud_rpc._parse_data_item):KeyErrorandIndexErrorare reported asFailed to import <file>: ...rather than "not a supported file type".Tests
server/tests/test_deserialize_viame_csv.py: mid-sequence gap, no matches, blank column.client/platform/desktop/backend/serializers/viame.spec.ts: the same three cases.Verified against the user's 8208-row CSV with one, three, first, and last images removed from the image map: no exceptions, correct track counts, warning names the images.
🤖 Generated with Claude Code