From 9e9aa657aa9b2ba5ced5c29b3613483dff8d25d3 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Tue, 21 Mar 2023 10:31:43 -0400 Subject: [PATCH] [147] fix image load error --- VERSION | 2 +- modules/meta.py | 3 +++ modules/util.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index a2361814..886ceff5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.18.3-develop146 +1.18.3-develop147 diff --git a/modules/meta.py b/modules/meta.py index 584b416d..4decccab 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -662,6 +662,9 @@ class MetadataFile(DataFile): for set_key, set_data in get_dict("sections", data).items(): if not isinstance(set_data, dict): raise Failed("Image Set Error: Set Data must be a dictionary") + elif "builders" not in set_data or not set_data["builders"]: + logger.trace(f"Skipping No Builder for Section: {set_key}") + continue elif item_attr not in set_data: raise Failed(f"Set Data must have the {item_attr} attribute") elif not set_data[item_attr]: diff --git a/modules/util.py b/modules/util.py index 4dc6ec25..70ddb83e 100644 --- a/modules/util.py +++ b/modules/util.py @@ -749,7 +749,7 @@ def parse(error, attribute, data, datatype=None, methods=None, parent=None, defa if datatype == "dict": return value elif datatype == "dictlist": - return {k: v if isinstance(v, list) else [v] for k, v in value.items()} + return {k: v if isinstance(v, list) else [v] if v else [] for k, v in value.items()} elif datatype == "dictliststr": return {str(k): [str(y) for y in v] if isinstance(v, list) else [str(v)] for k, v in value.items()} elif datatype == "strdict":