From e38da50f83f35dede0facf8708ea7f970da9f154 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 7 Nov 2024 17:09:49 +0100 Subject: [PATCH] Do not error on Load Warnings, but instead just log them. This allows the workfiles tool to not show a red "Failed to open workfile" message. Also avoids errors in "open_workfile" from headless mode if the file did open, but just had warnings --- client/ayon_houdini/api/pipeline.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/ayon_houdini/api/pipeline.py b/client/ayon_houdini/api/pipeline.py index b0d1c388e6..337e24c4a4 100644 --- a/client/ayon_houdini/api/pipeline.py +++ b/client/ayon_houdini/api/pipeline.py @@ -112,9 +112,12 @@ def open_workfile(self, filepath): # Force forwards slashes to avoid segfault filepath = filepath.replace("\\", "/") - hou.hipFile.load(filepath, - suppress_save_prompt=True, - ignore_load_warnings=False) + try: + hou.hipFile.load(filepath, + suppress_save_prompt=True, + ignore_load_warnings=False) + except hou.LoadWarning as exc: + log.warning(exc) return filepath