Skip to content

Commit

Permalink
fix: frame uid saved as int (changed to str)
Browse files Browse the repository at this point in the history
  • Loading branch information
tklockau committed Sep 8, 2023
1 parent d04d046 commit 0ffacbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion raillabel/format/raillabel/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _objects_asdict(self, objects: t.Dict[str, Object], calculate_pointers: bool
return {str(uid): object.asdict() for uid, object in objects.items()}

def _frames_asdict(self, frames: t.Dict[int, Frame]) -> dict:
return {uid: frame.asdict() for uid, frame in frames.items()}
return {str(uid): frame.asdict() for uid, frame in frames.items()}

def _frame_intervals_asdict(self, frame_intervals: t.List[FrameInterval]) -> t.List[dict]:
return [fi.asdict() for fi in frame_intervals]
2 changes: 1 addition & 1 deletion tests/test_raillabel/format/raillabel/test_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_asdict_frames(
"coordinate_systems": coordinate_systems_dict,
"objects": objects_dict,
"frames": {
frame.uid: frame_dict,
str(frame.uid): frame_dict,
},
"frame_intervals": [
{
Expand Down

0 comments on commit 0ffacbc

Please sign in to comment.