Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

[QUAD] Bug: Fix collect_sequence_frame_data crash with Standalone Publisher for fps value not found #6337

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -43,10 +43,8 @@ def process(self, instance):
instance.data[key] = value
self.log.debug(f"Collected Frame range data '{key}':{value} ")


def get_frame_data_from_repre_sequence(self, instance):
repres = instance.data.get("representations")
asset_data = instance.data["assetEntity"]["data"]

if repres:
first_repre = repres[0]
@@ -67,10 +65,22 @@ def get_frame_data_from_repre_sequence(self, instance):
collection = collections[0]
repres_frames = list(collection.indexes)

fps = None
# Try to retrieve the FPS value from the asset else the project
if "assetEntity" in instance.context.data:
fps = instance.data["assetEntity"]["data"].get("fps", None)
if not fps and "projectEntity" in instance.context.data:
fps = instance.context.data["projectEntity"]["data"].get("fps", None)
Copy link

Choose a reason for hiding this comment

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

line too long (85 > 79 characters)


if fps is None:
self.log.warning("Cannot properly retrieve the FPS value."
" Skipping to avoid crash later in the process.")
Copy link

Choose a reason for hiding this comment

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

line too long (82 > 79 characters)

return

return {
"frameStart": repres_frames[0],
"frameEnd": repres_frames[-1],
"handleStart": 0,
"handleEnd": 0,
"fps": asset_data["fps"]
"fps": fps
}