From 3abeec0221cb93040e1353c5c84d07e2dd228e4e Mon Sep 17 00:00:00 2001 From: Vidit-Ostwal Date: Thu, 20 Feb 2025 08:41:25 +0530 Subject: [PATCH] Fixed the print statement to include path as well --- src/crewai/cli/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crewai/cli/utils.py b/src/crewai/cli/utils.py index de1a909e3..8912036db 100644 --- a/src/crewai/cli/utils.py +++ b/src/crewai/cli/utils.py @@ -257,11 +257,11 @@ def get_crew(crew_path: str = "crew.py", require: bool = False) -> Crew | None: import os for root, _, files in os.walk("."): - if "crew.py" in files: - crew_path = os.path.join(root, "crew.py") + if crew_path in files: + crew_os_path = os.path.join(root, crew_path) try: spec = importlib.util.spec_from_file_location( - "crew_module", crew_path + "crew_module", crew_os_path ) if not spec or not spec.loader: continue @@ -275,7 +275,7 @@ def get_crew(crew_path: str = "crew.py", require: bool = False) -> Crew | None: try: if isinstance(attr, Crew) and hasattr(attr, "kickoff"): print( - f"Found valid crew object in attribute '{attr_name}'." + f"Found valid crew object in attribute '{attr_name}' at {crew_os_path}." ) return attr