diff --git a/src/backend/base/langflow/components/tools/PythonREPLTool.py b/src/backend/base/langflow/components/tools/PythonREPLTool.py index f2f3b4b52..914b6b965 100644 --- a/src/backend/base/langflow/components/tools/PythonREPLTool.py +++ b/src/backend/base/langflow/components/tools/PythonREPLTool.py @@ -36,7 +36,7 @@ class PythonREPLToolComponent(CustomComponent): imported_module = importlib.import_module(module) global_dict[imported_module.__name__] = imported_module except ImportError: - print(f"Could not import module {module}") + raise ImportError(f"Could not import module {module}") return global_dict def build(