From 4e891997dee2c2fbf0c1e85fe44b2496707a43ef Mon Sep 17 00:00:00 2001 From: FugitiveExpert01 Date: Sat, 7 Mar 2026 16:44:36 +0100 Subject: [PATCH] Implement error handling for node imports Added error handling for importing node mappings with logging. --- __init__.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/__init__.py b/__init__.py index e12f3a5..225a4af 100644 --- a/__init__.py +++ b/__init__.py @@ -3,10 +3,23 @@ FEnodes — ComfyUI custom node pack Author: FugitiveExpert01 """ -from .nodes_tiling import NODE_CLASS_MAPPINGS as _TILING_CLASSES -from .nodes_tiling import NODE_DISPLAY_NAME_MAPPINGS as _TILING_NAMES -from .nodes_text import NODE_CLASS_MAPPINGS as _TEXT_CLASSES -from .nodes_text import NODE_DISPLAY_NAME_MAPPINGS as _TEXT_NAMES +import logging + +try: + from .nodes_tiling import NODE_CLASS_MAPPINGS as _TILING_CLASSES + from .nodes_tiling import NODE_DISPLAY_NAME_MAPPINGS as _TILING_NAMES +except Exception as e: + logging.warning(f"[FEnodes] Failed to load Tiling nodes: {e}") + _TILING_CLASSES = {} + _TILING_NAMES = {} + +try: + from .nodes_text import NODE_CLASS_MAPPINGS as _TEXT_CLASSES + from .nodes_text import NODE_DISPLAY_NAME_MAPPINGS as _TEXT_NAMES +except Exception as e: + logging.warning(f"[FEnodes] Failed to load Text nodes: {e}") + _TEXT_CLASSES = {} + _TEXT_NAMES = {} NODE_CLASS_MAPPINGS = { **_TILING_CLASSES,