I created an empty template project using crewai create. I changed it to hierarchical, edited the yaml files, updated the crew.py file. I ran into several issues with the template (e.g. agent and expected_output missing from task.yaml). Now I am stuck with an error in the initialization of Crew class. When running ‘crewai run’. I get the error:
AttributeError: ‘function’ object has no attribute ‘get’
With this stack trace:
Traceback (most recent call last):
File “/.venv/bin/run_crew”, line 8, in
sys.exit(run())
^^^^^
File “/src/okr_crew/main.py”, line 23, in run
OkrCrew().crew().kickoff(inputs=inputs)
^^^^^^^^^^^^^^^^
File “/.venv/lib/python3.12/site-packages/crewai/project/utils.py”, line 7, in memoized_func
cache[key] = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/.venv/lib/python3.12/site-packages/crewai/project/annotations.py”, line 97, in wrapper
crew = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/src/okr_crew/crew.py”, line 56, in crew
return Crew(
^^^^^
File “/okr_crew/.venv/lib/python3.12/site-packages/pydantic/main.py”, line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/.venv/lib/python3.12/site-packages/crewai/agents/agent_builder/base_agent.py”, line 137, in process_model_config
return process_config(values, cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/.venv/lib/python3.12/site-packages/crewai/utilities/config.py”, line 19, in process_config
config = values.get(“config”, {})
^^^^^^^^^^
AttributeError: ‘function’ object has no attribute ‘get’
An error occurred while running the crew: Command ‘[‘uv’, ‘run’, ‘run_crew’]’ returned non-zero exit status 1.
Any idea on how I could try to understand the root cause of this issue?
How to best run ‘crewai run’ in debug mode from VSCode so that I can figure out what is going on under the hood?
Am I doing something completely wrong in the setup