From a747f67f638304ae7ffa39482f6fb256a59c6a45 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Sat, 21 Mar 2026 15:32:41 -0700 Subject: [PATCH] fix(pipeline): Fix config module reference in pipeline_runner - Import engine config module as engine_config to avoid name collision - Fix UnboundLocalError when accessing config.MESSAGE_DISPLAY_SECS --- engine/app/pipeline_runner.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/engine/app/pipeline_runner.py b/engine/app/pipeline_runner.py index dc7e0f9..df8a2c2 100644 --- a/engine/app/pipeline_runner.py +++ b/engine/app/pipeline_runner.py @@ -314,14 +314,17 @@ def run_pipeline_mode(preset_name: str = "demo"): # Add message overlay stage if enabled if getattr(preset, "enable_message_overlay", False): + from engine import config as engine_config from engine.pipeline.adapters import MessageOverlayConfig overlay_config = MessageOverlayConfig( enabled=True, - display_secs=config.MESSAGE_DISPLAY_SECS - if hasattr(config, "MESSAGE_DISPLAY_SECS") + display_secs=engine_config.MESSAGE_DISPLAY_SECS + if hasattr(engine_config, "MESSAGE_DISPLAY_SECS") else 30, - topic_url=config.NTFY_TOPIC if hasattr(config, "NTFY_TOPIC") else None, + topic_url=engine_config.NTFY_TOPIC + if hasattr(engine_config, "NTFY_TOPIC") + else None, ) pipeline.add_stage( "message_overlay", MessageOverlayStage(config=overlay_config) @@ -643,15 +646,16 @@ def run_pipeline_mode(preset_name: str = "demo"): # Add message overlay stage if enabled if getattr(new_preset, "enable_message_overlay", False): + from engine import config as engine_config from engine.pipeline.adapters import MessageOverlayConfig overlay_config = MessageOverlayConfig( enabled=True, - display_secs=config.MESSAGE_DISPLAY_SECS - if hasattr(config, "MESSAGE_DISPLAY_SECS") + display_secs=engine_config.MESSAGE_DISPLAY_SECS + if hasattr(engine_config, "MESSAGE_DISPLAY_SECS") else 30, - topic_url=config.NTFY_TOPIC - if hasattr(config, "NTFY_TOPIC") + topic_url=engine_config.NTFY_TOPIC + if hasattr(engine_config, "NTFY_TOPIC") else None, ) pipeline.add_stage(