python-poetry / python-poetry/poetry
Improve Error Messaging for Poetry Scripts when Missing Main Package
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
Feature Request
Description
When trying to run a script, users may receive a generic error message about the main package not being found. Sometimes this error message is not entirely related to the problem, as the absence of the main package should not affect the running of unrelated scripts. Additionally, it is misleading because it points users towards an error that is not caused by the script itself.
Current Behavior
When attempting to run a script, users encounter a generic error message about the main package not being found.
Desired Behavior
- Improve the error message for missing main packages, as suggested in this issue.
- Remove this error message entirely unless the script is related to the main package itself.
Use Case
A user tries to run a script that utilizes Poetry for dependency management. However, the script does not rely on the main package, yet it refuses to run giving a confusing message.
Benefits
- Enhances user experience by providing clearer error messages.
- Reduces confusion and frustration among users encountering this issue.
- Improves the overall usability of Poetry for managing Python projects.
Additional Context
- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the FAQ and general documentation and believe that my question is not already covered.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the related issue 9010, then trace the Poetry script execution path that produces the missing-main-package error. The work is complete when unrelated scripts no longer show that error and scripts related to the main package receive the clearer message described by the linked issue; the payload names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100