From 65263b7c6e2968c9dd85549d1afcc3741eeb6af9 Mon Sep 17 00:00:00 2001 From: WSHAPER <42714629+WSHAPER@users.noreply.github.com> Date: Thu, 30 Apr 2026 00:19:26 +0200 Subject: [PATCH] GH-602 fix: wrap importlib.import_module in try/except to prevent full plugin crash import_module was called outside the try/except block, so any single broken module (e.g. color_name.py referencing undefined find_best_match_by_similarity) crashes the entire plugin and prevents all 164+ nodes from registering. --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index fd50801f..e30041e8 100644 --- a/__init__.py +++ b/__init__.py @@ -32,8 +32,8 @@ def serialize(obj): if not file.endswith(".py"): continue name = os.path.splitext(file)[0] - imported_module = importlib.import_module(".py.{}".format(name), __name__) try: + imported_module = importlib.import_module(".py.{}".format(name), __name__) NODE_CLASS_MAPPINGS = {**NODE_CLASS_MAPPINGS, **imported_module.NODE_CLASS_MAPPINGS} NODE_DISPLAY_NAME_MAPPINGS = {**NODE_DISPLAY_NAME_MAPPINGS, **imported_module.NODE_DISPLAY_NAME_MAPPINGS} serialized_CLASS_MAPPINGS = {k: serialize(v) for k, v in imported_module.NODE_CLASS_MAPPINGS.items()}