Skip to content

[BUG] Naming a crew "test" causes errors #4345

@hi117

Description

@hi117

Description

More of a polish thing, if you create a crew with crewai create crew and name it test, the name conflicts with other keys in files causing errors.

Steps to Reproduce

  1. Run crewai create crew test
  2. Try to run it
  3. Get errors

Expected behavior

Either that it works with a name of test or that the tool tells me to pick a different name

Screenshots/Code snippets

% crewai create crew test    
Creating folder test...
Select a provider to set up:
1. openai
2. anthropic
3. gemini
4. nvidia_nim
5. groq
6. huggingface
7. ollama
8. watson
9. bedrock
10. azure
11. cerebras
12. sambanova
13. other
q. Quit
Enter the number of your choice or 'q' to quit: 7
Select a model to use for Ollama:
1. ollama/llama3.1
2. ollama/mixtral
q. Quit
Enter the number of your choice or 'q' to quit: 1
API keys and model saved to .env file
Selected model: ollama/llama3.1
  - Created test/.gitignore
  - Created test/pyproject.toml
  - Created test/README.md
  - Created test/knowledge/user_preference.txt
  - Created test/src/test/__init__.py
  - Created test/src/test/main.py
  - Created test/src/test/crew.py
  - Created test/src/test/tools/custom_tool.py
  - Created test/src/test/tools/__init__.py
  - Created test/src/test/config/agents.yaml
  - Created test/src/test/config/tasks.yaml
Crew test created successfully!

Operating System

Ubuntu 20.04

Python Version

3.10

crewAI Version

v1.9.3

crewAI Tools Version

v1.9.3

Virtual Environment

Venv

Evidence

warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 16, column 1
     |
  16 | test = "test.main:test"
     | ^^^^
  duplicate key

error: Failed to parse: `pyproject.toml`
  Caused by: TOML parse error at line 16, column 1
   |
16 | test = "test.main:test"
   | ^^^^
duplicate key
An error occurred while running the crew: Command '['uv', 'sync']' returned non-zero exit status 2.```

### Possible Solution

Crewai create crew should warn on this case

### Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions