for from crewai and crewai.project ; python is updated accordingly and crewai is imported…
Can you share the full error message please?
heres one; same error for crewai but for some reason i can only add one screenshot per response
Can you share the code/repo so I can troubleshoot? Also what system are you using?
macos
code is local atm; i can push it if you prefer and give you access.
from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
@CrewBase
class QaComply():
"""QaComply crew"""
agents_config = 'config/agents.yaml'
tasks_config = 'config/tasks.yaml'
@agent
def researcher(self) -> Agent:
return Agent(
config=self.agents_config['compliance_control_specialist'],
# tools=[MyCustomTool()], # Example of custom tool, loaded on the beginning of file
verbose=True
)
@agent
def reporting_analyst(self) -> Agent:
return Agent(
config=self.agents_config['uat_tester'],
verbose=True
)
@task
def research_task(self) -> Task:
return Task(
config=self.tasks_config['controls_task'],
)
@task
def reporting_task(self) -> Task:
return Task(
config=self.tasks_config['uat_task'],
output_file='report.md'
)
@crew
def crew(self) -> Crew:
"""Creates the QaComply crew"""
return Crew(
agents=self.agents, # Automatically created by the @agent decorator
tasks=self.tasks, # Automatically created by the @task decorator
process=Process.sequential,
verbose=True,
# process=Process.hierarchical, # In case you wanna use that instead https://docs.crewai.com/how-to/Hierarchical/
)
Thank you for the code. Just to make sure everything is setup correctly:
- Check the version of
crewai
you havepip show crewai
- Are you using a virtual env? If yes, make sure you’ve activated it and using it within your IDE. Also, which Python and crewai versions are you using?
Let me know the above and if still getting errors, share the full code in a repo so I can clone and run it.
yes using virtual env and yes it’s activated
heres the version
myenv) MacBookPro:crewai_crew1 alexanderchristian$ pip show crewai
Name: crewai
Version: 0.79.4
Summary: Cutting-edge framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
Home-page:
Author:
Author-email: Joao Moura joao@crewai.com
License:
Location: /Users/alexanderchristian/crewai_crew1/myenv/lib/python3.11/site-packages
Requires: appdirs, auth0-python, chromadb, click, crewai-tools, instructor, json-repair, jsonref, langchain, litellm, openai, opentelemetry-api, opentelemetry-exporter-otlp-proto-http, opentelemetry-sdk, pydantic, python-dotenv, pyvis, regex, tomli, tomli-w, uv
Required-by:
what’s your github profile?
fwiw it looks like conda is running in paralel and won’t deactivate which might be an issue