diff --git a/meshroom/core/fileUtils.py b/meshroom/core/fileUtils.py index f79e3c85f9..92b8f0490b 100644 --- a/meshroom/core/fileUtils.py +++ b/meshroom/core/fileUtils.py @@ -9,10 +9,11 @@ def getFileElements(inputFilePath: str): filename = os.path.basename(inputFilePath) match = compiled_pattern.fullmatch(filename) - frameId_str = match.group("FRAMEID_STR") + frameId_str = None fileElements = {} if match: + frameId_str = match.group("FRAMEID_STR") fileElements = { "": inputFilePath, "": filename, @@ -20,6 +21,7 @@ def getFileElements(inputFilePath: str): "": match.group("FILESTEM_PREFIX"), "": match.group("EXTENSION"), } + if frameId_str is not None: fileElements[""] = frameId_str fileElements[""] += frameId_str