From c1abefbbf3c91989a73d7ab83201193275e9e645 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Thu, 19 Mar 2026 21:25:29 -0400 Subject: [PATCH] fix: catch ImportError in dotted path resolution for broken modules --- lib/crewai/src/crewai/types/callback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crewai/src/crewai/types/callback.py b/lib/crewai/src/crewai/types/callback.py index 74cf8a3f6..ad201a0d4 100644 --- a/lib/crewai/src/crewai/types/callback.py +++ b/lib/crewai/src/crewai/types/callback.py @@ -101,7 +101,7 @@ def _resolve_dotted_path(path: str) -> Callable[..., Any]: module_path = ".".join(parts[:i]) try: obj: Any = importlib.import_module(module_path) - except (ModuleNotFoundError, ValueError): + except (ImportError, ValueError): continue # Walk the remaining attribute chain. try: