python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.82k stars 2.28k forks source link

(🐞) Error messages are often non-contextual and completely useless #8883

Closed KotlinIsland closed 10 months ago

KotlinIsland commented 10 months ago

Consider:

> poetry install

Cannot overwrite a value (at line 10, column 20)
The actual context

```toml [tool.poetry] name = "test" version = "1" description = "" authors = ["..."] [tool.poetry.dependencies] python = "^3.12" basedmypy = "2.4.0" basedmypy = "2.4.0" ```

My only option from here is to supply -v and see a wall of source code.

This issue is not this specific scenario, rather, the general content of error messages in Poetry.

Desired behaviour

The context of any third party error is presented:

> poetry install

An unexpected error was encountered during analysis of the pyproject.toml file:

    Cannot overwrite a value (at line 10, column 20)

If there is not specific handling for a third party error then:

> poetry install

An unexpected error occurred during execution of poetry:

    TOMLDecodeError: Cannot overwrite a value (at line 10, column 20)

You can run again with `-v` and raise an issue at https://github.com/python-poetry/poetry/issues

Related

dimbleby commented 10 months ago

Like its duplicate #5885, this report is too broad to be useful.

Please raise issues - or preferably merge requests - against specific unhelpful errors.

KotlinIsland commented 10 months ago

this report is too broad to be useful

I disagree, there should be some level of explanation on an unhandled exception, not just the raw error message.

KotlinIsland commented 10 months ago
github-actions[bot] commented 9 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.