From 0a3d2f596ee88a592c1b76b2b8a3311a19b7ea4e Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Thu, 19 Mar 2026 21:35:57 -0400 Subject: [PATCH] fix: catch TypeError from relative imports in dotted path resolution --- 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 8c35ddca0..2a8be235e 100644 --- a/lib/crewai/src/crewai/types/callback.py +++ b/lib/crewai/src/crewai/types/callback.py @@ -108,7 +108,7 @@ def _resolve_dotted_path(path: str) -> Callable[..., Any]: module_path = ".".join(parts[:i]) try: obj: Any = importlib.import_module(module_path) - except (ImportError, ValueError): + except (ImportError, TypeError, ValueError): continue # Walk the remaining attribute chain. try: