You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a new project in CrewAI using crewai create crew <project_name> and setting the project name to match any of the script names in project.scripts (e.g., test, run_crew, train, replay), the generated pyproject.toml contains duplicate keys, which leads to parsing errors. This is due to the pyproject.toml template used in the CLI tool, where the project.scripts section assigns the project name as a key, resulting in duplication when the project name conflicts with an existing key.
Steps to Reproduce
Install CrewAI, version 0.80.0.
Create a new project with crewai create crew test (or any project name that matches a key in project.scripts).
Navigate to the created project and attempt to install dependencies with crewai install.
Expected behavior
The pyproject.toml file should be generated without duplicate keys in the project.scripts section, allowing dependencies to install without errors.
(.venv) ~/d/a/test ❯❯❯ crewai install
warning: Failed to parse pyproject.toml during settings discovery:
TOML parse error at line 16, column 1
|
16 | test = "test.main:test"
| ^
duplicate key test in table project.scripts
error: Failed to parse: pyproject.toml
Caused by: TOML parse error at line 16, column 1
|
16 | test = "test.main:test"
| ^
duplicate key test in table project.scripts
Possible Solution
Modify the template generation logic in the CLI tool to check for duplicate keys in project.scripts. Alternatively, add a check to prevent project names that would conflict with default script names (e.g., test, run_crew, train, replay).
Additional context
None - reach out if you need more
The text was updated successfully, but these errors were encountered:
Description
When creating a new project in CrewAI using crewai create crew <project_name> and setting the project name to match any of the script names in project.scripts (e.g., test, run_crew, train, replay), the generated pyproject.toml contains duplicate keys, which leads to parsing errors. This is due to the pyproject.toml template used in the CLI tool, where the project.scripts section assigns the project name as a key, resulting in duplication when the project name conflicts with an existing key.
Steps to Reproduce
Expected behavior
The pyproject.toml file should be generated without duplicate keys in the project.scripts section, allowing dependencies to install without errors.
Screenshots/Code snippets
Template in CLI Tool:
Generated pyproject.toml with Project Name test:
Operating System
macOS Sonoma
Python Version
3.12
crewAI Version
0.80.0
crewAI Tools Version
Virtual Environment
Venv
Evidence
(.venv) ~/d/a/test ❯❯❯ crewai install
warning: Failed to parse
pyproject.toml
during settings discovery:TOML parse error at line 16, column 1
|
16 | test = "test.main:test"
| ^
duplicate key
test
in tableproject.scripts
error: Failed to parse:
pyproject.toml
Caused by: TOML parse error at line 16, column 1
|
16 | test = "test.main:test"
| ^
duplicate key
test
in tableproject.scripts
Possible Solution
Modify the template generation logic in the CLI tool to check for duplicate keys in project.scripts. Alternatively, add a check to prevent project names that would conflict with default script names (e.g., test, run_crew, train, replay).
Additional context
None - reach out if you need more
The text was updated successfully, but these errors were encountered: