Hi all, I’m running into an issue with context defined in my tasks.yaml in crewai 0.83.0
Traceback (most recent call last):
File "<path_to_script>/run_crew", line 8, in <module>
sys.exit(run())
^^^^^
File "<path_to_project>/main.py", line 23, in run
CrewaiAirtableDemo().crew().kickoff(inputs=inputs)
^^^^^^^^^^^^^^^^^^^^
File "<path_to_library>/crew_base.py", line 35, in __init__
self.map_all_task_variables()
File "<path_to_library>/crew_base.py", line 166, in map_all_task_variables
self._map_task_variables(
File "<path_to_library>/crew_base.py", line 189, in _map_task_variables
self.tasks_config[task_name]["context"] = [
^
File "<path_to_library>/crew_base.py", line 190, in <listcomp>
tasks[context_task_name]() for context_task_name in context_list
~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'review_product_website'
An excerpt from tasks.yaml:
review_product_website:
description: >
Retrieve information about {product_name} from {product_url}.
Extract key details from the website.
expected_output: >
Raw text or product information from the website.
agent: researcher
write_product_description:
description: >
Write a concise and objective product description and value proposition based on gathered data.
Highlight important features etc etc.
expected_output: >
A paragraph summarizing the product description and value proposition from an objective point of view.
context:
- review_product_website
- another_task_defined_above
agent: product_analyst
async_execution: True
This is intended to be a sequential process, and the tasks are ordered as such. crew.py
follows the same order.
I installed with pip and am running the crew with crewai run
, in case that makes a difference. (I’m a little confused on what the current recommendation is with pip vs. poetry.)
Thanks, and let me know if more information would be helpful.