Crewai is not running properly

.venv) paarttipaa@Paarttipaabhalajis-MacBook-Pro trail % crewai run
Running the Crew
warning: `VIRTUAL_ENV=/Users/paarttipaa/ProjectTask/GithubProj/agent-kit/tutorials/crewai/.venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead
Using CPython 3.12.6 interpreter at: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3
Creating virtual environment at: .venv
Built trail @ file:///Users/paarttipaa/ProjectTask/GithubProj/agent-kit/tutorials/crewai/trail
Installed 200 packages in 484ms
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Crew Execution Started โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ Crew Execution Started โ”‚
โ”‚ Name: crew โ”‚
โ”‚ ID: f783d384-4d96-490c-9cdc-1d496f8803a9 โ”‚
โ”‚ โ”‚
โ”‚ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

# Agent: AI LLMs Senior Data Researcher
## Task: Conduct a thorough research about AI LLMs Make sure you find any interesting and relevant information given the current year is 2025.

:rocket: Crew: crew
โ””โ”€โ”€ :clipboard: Task: a0508086-2bac-43f7-a62c-c420f39dd881
Status: Executing Taskโ€ฆ
โ””โ”€โ”€ :brain: Thinkingโ€ฆ

still is keep on thinking. crewai is not properly executing. in ipynb its runing fine. but in cli its not running properly.

Steps to follow:

  1. install the crewai and create a crew using the command.
  2. run the crew using crewai run command.

waiting for around half an hour . it not running.

Had the same problem with crewai version 0.121, rolled back to 0.120 and it works again.

You guys are absolutely right. Thereโ€™s a bug thatโ€™s just freezing up the console. Right when you see that ๐Ÿง  Thinking... message, whatโ€™s actually happening is an OpenAIError exception popping up because the OPENAI_API_KEY is missing. The problem is, this exception isnโ€™t being shown since the console is frozen, and the process canโ€™t move forward either.

Iโ€™m digging into it now to gather more details for a report.

@tonykipkemboi, this is a critical bug Iโ€™ve been noticing in the new version. It now seems like whenever litellm.completion raises an error, the console fails to update and the code just hangs indefinitely.

1 Like

Recently, I have to fight against the following, when using o4-mini:

OpenAIException - Invalid prompt: your prompt was flagged as potentially violating our usage policy. Please try again with a different prompt.

Could that also cause 0.121 to freeze? Because, I am very sure, that my OPENAI_API_KEY has been correctly set.

While the console formatting bug is getting fixed, you should just roll back to the previous version:

cd /path/to/your/project
uv add "crewai<0.121.0"
crewai run

thanks for flagging. will look into this.

could you share your code so we can replicate? it seems itโ€™s happening inconsistently at the moment.

Looking into it!
Thanks for reporting, sorry about the furstation

1 Like

Update: Fixed in commit 4e0ce9a.

1 Like

great catch, fix is in main already, new version will be out tomorrow

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.