Skip to content

Fix single-dataset dive_json export emitting tracks as a list#1703

Merged
BryonLewis merged 1 commit into
mainfrom
unify-dive-json-export
Jun 17, 2026
Merged

Fix single-dataset dive_json export emitting tracks as a list#1703
BryonLewis merged 1 commit into
mainfrom
unify-dive-json-export

Conversation

@PaulHax

@PaulHax PaulHax commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

The single-dataset dive_json export built tracks as a list, while every other producer/consumer treats it as a dict keyed by id (get_annotations, the multicam path, the DIVEAnnotationSchema type, and the client's MultiTrackRecord).

The result: a single-cam .dive.json export can't be re-imported — serializers/dive.py calls tracks.items() and raises AttributeError: 'list' object has no attribute 'items'.

Route the single-dataset dive_json export through
crud_dataset._dive_json_export_text so tracks serialize as the canonical
dict keyed by id (matching get_annotations, the multicam path, and what
serializers/dive.py re-import expects). The old inline path emitted a
list, which AttributeErrors on re-import. Also drops leftover debug prints.

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is something I've been meaning to fix but just never got around to it.

@BryonLewis BryonLewis merged commit f0ebf9c into main Jun 17, 2026
3 checks passed
@BryonLewis BryonLewis deleted the unify-dive-json-export branch June 17, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants