crewAI: [BUG] errors on "crewai reset-memories" CLI command
Description
Error running command crewai reset-memories --knowledge or crewai reset-memories -a from inside a crew project.
Error message:
An unexpected error occurred: No crew found.
Steps to Reproduce
- Create new crewai project
- cd, install, etc.
- Run
crewai reset-memories -knorcrewai reset-memories --knowledge - See “An unexpected error occurred: No crew found.” message
Expected behavior
Expected “memory system is not initialized message”:
[2025-03-07 12:11:35][ERROR]: Failed to reset knowledge memory: knowledge memory system is not initialized
An unexpected error occurred: Failed to reset knowledge memory: knowledge memory system is not initialized
Screenshots/Code snippets
$ crewai reset-memories -a
An unexpected error occurred: No crew found.
$ crewai reset-memories -s
An unexpected error occurred: No crew found.
$ crewai reset-memories -l
An unexpected error occurred: No crew found.
$ crewai reset-memories -kn
An unexpected error occurred: No crew found.
Operating System
OS X
Python Version
3.10
crewAI Version
0.102.0
crewAI Tools Version
0.36.0
Virtual Environment
Venv
Evidence
$ crewai reset-memories -a
An unexpected error occurred: No crew found.
$ crewai reset-memories --knowledge
An unexpected error occurred: No crew found.
Possible Solution
Fix the way get_crew looks for and returns a crew instance.
https://github.com/crewAIInc/crewAI/pull/2309
Additional context
Works fine in previous version 0.100.0.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (15 by maintainers)
Commits related to this issue
- Adjust checking for callable crew object. Changes back to how it was being done before. Fixes #2307 — committed to caike/crewAI by caike 2 years ago
- Adjust checking for callable crew object. Changes back to how it was being done before. Fixes #2307 — committed to caike/crewAI by caike 2 years ago
- Pr branch (#2312) * Adjust checking for callable crew object. Changes back to how it was being done before. Fixes #2307 * Fix specific memory reset errors. When not initiated, the function should ... — committed to crewAIInc/crewAI by Vidit-Ostwal 2 years ago
Still hapenning. crewai reset-memories -a
An unexpected error occurred: No crew found.
crewai --version
crewai, version 0.108.0
@bhancockio
@lucasgomide, could we reopen this issue? It is still active and already linked to a PR.
I don’t have permission to re-open the issue either.
I confirm that this is still a bug even with the latest crewai version 0.108.0. @Vidit-Ostwal