From 818a9f21f3e2db35f7d730b414820ee0cad77849 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:39:52 +0100 Subject: [PATCH 1/2] safe collection of rescale arguments --- .../publish/extract_thumbnail_from_source.py | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py b/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py index 913bf818a4..fba7133453 100644 --- a/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py +++ b/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py @@ -160,9 +160,14 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin): dst_path: str, ) -> bool: self.log.debug("Outputting thumbnail with OIIO: {}".format(dst_path)) - resolution_args = self._get_resolution_args( - "oiiotool", src_path - ) + try: + resolution_args = self._get_resolution_args( + "oiiotool", src_path + ) + except Exception: + self.log.warning("Failed to get resolution args for OIIO.") + return False + oiio_cmd = get_oiio_tool_args("oiiotool", "-a", src_path) if resolution_args: # resize must be before -o @@ -188,9 +193,14 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin): src_path: str, dst_path: str, ) -> bool: - resolution_args = self._get_resolution_args( - "ffmpeg", src_path - ) + try: + resolution_args = self._get_resolution_args( + "ffmpeg", src_path + ) + except Exception: + self.log.warning("Failed to get resolution args for ffmpeg.") + return False + max_int = str(2147483647) ffmpeg_cmd = get_ffmpeg_tool_args( From c55c6a2675d7761effaa8525b0f40849a616b413 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Thu, 18 Dec 2025 16:44:15 +0100 Subject: [PATCH 2/2] fix doubled line --- .../ayon_core/plugins/publish/extract_thumbnail_from_source.py | 1 - 1 file changed, 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py b/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py index fba7133453..5535c503f3 100644 --- a/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py +++ b/client/ayon_core/plugins/publish/extract_thumbnail_from_source.py @@ -201,7 +201,6 @@ class ExtractThumbnailFromSource(pyblish.api.InstancePlugin): self.log.warning("Failed to get resolution args for ffmpeg.") return False - max_int = str(2147483647) ffmpeg_cmd = get_ffmpeg_tool_args( "ffmpeg",