crewAI
crewAI copied to clipboard
[BUG] train -f filename error message is inverted
Description
train_crew in lib/cli/src/crewai_cli/train_crew.py:19-20 rejects names without .pkl but the message says the opposite.
Steps to Reproduce
- Run
crewai train -f myfile.txt - See
ValueError: The filename must not end with .pkl
Expected behavior
Message should say the filename must end with .pkl.
Screenshots/Code snippets
if not filename.endswith('.pkl'):
raise ValueError('The filename must not end with .pkl')
Operating System
Windows 11
Python Version
3.12
crewAI Version
main @ 738c8e19
crewAI Tools Version
N/A
Virtual Environment
Venv
Evidence
Local repro with subprocess.run mocked: train_crew(5, 'myfile.txt') raises the above before any subprocess call. Default trained_agents_data.pkl passes.
Possible Solution
Change message to The filename must end with .pkl. 1 string, no behavior change.
Additional context
I'm working on this, PR to follow.
llm-generated: yes - drafted with AI assistance, verified locally.