poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Request for clearer error message parsing pyproject.toml

Open Evan0000000000 opened this issue 1 year ago • 0 comments

Issue Kind

Change in current behaviour

Description

When the tool.poetry.source section in pyproject.toml is provided as a [single table] rather than [[array of tables]] the error poetry provides isn't very helpful:

The Poetry configuration is invalid:
  - data.source must be array

A more descriptive error and/or a reference to what section or line in the toml would be a little more friendly. Tried this with -vvv and the stack trace also doesn't give a clue to what part of the toml is actually the problem.

A more broad way to phrase it, if you like, might be "toml structure errors should report a line or section if possible"

Impact

Some more info in the error would make troubleshooting faster; as it is one either 'just knows' the expected structure or goes section by section, which might be slower or faster depending on the size of pyproject.toml.

Workarounds

None that I'm aware of

Evan0000000000 avatar Dec 12 '24 18:12 Evan0000000000