-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Confusing error msg if path in "packages" doesn't exist #2139
Comments
I have the same issue. for me I believe it is because of this portion of my packages = [
{ include = "bohemian", from = "src"}
] I am mostly doing this, because my project is inside a poetry install --no-root and then don't install or run |
I have been hitting this error as well. I considered moving to a src layout, then changed my mind, and eventually ran poetry with This is clearly a user error on my side but the error message is less than helpful and the traceback with |
Got the same meaningless error, but should be fixed by #2265 |
As already mentioned, this was fixed by #2265. |
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. |
Feature Request
Could poetry please handle typos/errors in
tool.poetry.packages
better?If you make a typo or another error in specifying packages to include into your package and the modules specified in pyproject.toml don't exist, you'll get a very user-unfriendly message:
Let's say you have a package called dummy_package and in it you have python modules dummy1 and dummy2 you want to include into the package. Then you'd like to put this into your pyproject.toml:
If instead you make a mistake and have e.g. this there:
You ge tthe above mentioned error which is very confusing and not helpful at all.
The error happens because you mention a module that doesn't exist in your project directory. The actual error happens in method
check_elements()
(specifically on line 37 in current master) inpoetry/masonry/utils/package_include.py
but I think it might be detectable inpoetry/masonry/utils/include.py
where it tries to expand the path. Maybe there it could issue a warning or something?The issue was mentioned e.g. in #1247 but that issue is closed and I'd like this to get a little more attention as I spent a few hours debugging this.
Thank you!
The text was updated successfully, but these errors were encountered: