Failed to parse: pyproject.toml

I’ve been having significant trouble with the Poetry package system. Previously, I had a smooth experience using venv and running Python scripts with python {script.py}. However, after switching to the new CrewAI template, which uses the crewai run syntax and requires a pyproject.toml file from Poetry, I started encountering issues left and right.

Some of the errors include complaints about formatting in the autogenerated TOML file, such as:

Failed to parse: pyproject.toml
  Caused by: TOML parse error at line 8, column 19
  |
8 | requires-python = "^3.12"
  |                   ^^^^^^^
Failed to parse version: Unexpected end of version specifier, expected operator: ^3.12

Or errors like:

error: No project table found in toml

Eventually, I deactivated Poetry and switched back to venv, but then had to refactor every config YAML reference from self.agents_config to a loaded YAML file manually.

What’s the best way to get past these issues? Any help would be greatly appreciated!

@noSuchFile In recent days, some people on this forum say they have problems with basic CrewAI CLI commands. Try to downgrade the CrewAI SDK a little bit.

The CrewAI staff is shipping fast, as João (i.e., the CEO) likes to say. The downside of this is that new CrewAI SDK versions are sometimes a bit more buggy.

1 Like