-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error message specifying that we can't parse pyproject.toml #734
Conversation
I think the I'd even go as far as to suggest the most likely cause, and how to fix it, maybe similar to:
Couldn't find a good way to check for that duplication from the exception alone. if e.msg = 'Cannot overwrite a value':
txt += "\nThis is often caused by a duplicate entry." This give everyone a clear cause to look out for. |
That's ok with me. |
Done. Getting the message out of a
The unit test would also fail, so it would be caught and updated eventually. |
Add the TOML error message at 0 verbosity. Add clarifying detail if the error is due to a duplicate entry.
Co-authored-by: Randy Döring <30527984+radoering@users.noreply.github.com>
Thanks for this @mscheifer! |
Resolves: python-poetry/poetry#9394
Problem
Poetry gives confusing error messages when there is a parse error in the pyproject.toml file.
For example:
The error is confusing because it's unclear that this error relates to parsing the pyproject.toml file. For
poetry run
specifically it's also unclear if the error is coming from poetry or the command you are running.Change
With this change instead we will see.
Open questions
Should we try to include the toml parse error at 0 verbosity somehow? Or alternatively, we could explicitly say "re-run with -v" in the message.Yes let's include the exception message.Please let me know if anything should be changed to fit the project code standards.