-
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
No file/folder found for package #8662
Comments
And do you have an |
no, its a django project. |
and the |
what part of the message do you think is wrong? |
hmhmh None? |
then please close the issue report |
I don't understand what is going on here; I am sure my project used to work but now it doesn't. What does it mean - that I now have to have my source files in a sub-directory with the same name as my project? |
That's just a warning. If your project used to work, it will probably still work despite of this warning. It means that you either have to make your project packageable or use Or ignore the warning for now and wait for #8650. |
this is a weird error happening for me as well. |
hi guys i've solved the problem renaming the project name in |
Facing a similar issue - just want to check my understanding. Here's my minimum repro:
I've not had this warning before - but to my understanding my root is the parent directory 'test' and this isn't being respected by the Edits: Changed formatting for clarity |
|
A common poetry project should have four part: If you use poetry version, such as 1.4.0, poetry will not check these files. |
This comment has been minimized.
This comment has been minimized.
I upgraded from 1.4.1 to 1.7.1. requiring the folder in which you want to create a |
I upgraded from 1.6 to 1.7. I did not understand that this message is a warning. That is because it does not say "Warning" anywhere in the message. Unhelpful.
|
just create an folder with the name in pyproject.toml and put py file inside. |
+1 to this being a breaking change - No explicit statement this is a warning causes a lot of worry, and we shouldn't have to require the name of the folder to match the name of the project. We may want the project name to be more descriptive vs the folder name in the case of monorepos. |
I meet this warning because the folder name is different from the project name in 'pyproject.toml' |
Yeah so I don't know who is using pyproject.toml in their project root (e.g. outside the base folder, for instance I have my files inside |
your setup needs be like this: |
|
I get it, I just also think don't tell me how to scaffold my projects or how they should be designed, it's not Poetry's job. Give me an entry point like Node / Bun. |
In hindsight, we should probably have prefixed the message with
Unfortunately, it is Poetry's job to tell you if your project can't be packaged and thus not installed since Poetry is not only for dependency management but also for packaging. There are two opposite groups of users:
All in all. #8662 (comment) still holds true. With #8650, you will have a means to silence this warning without always typing |
@radoering I get that it is poetry's job to tell me if it can or can't be packaged, but this is not a packaging issue. My poetry project worked perfectly fine before requiring an asinine folder. If you want to fix this, include more details in the warning so people like me don't go wtf for an hour and a half and then come here because it was suddenly added. On top of that, the pyproject.toml could be used to find the root folder instead of some arbitrary requirement. Or maybe look for a src folder or allow an entrypoint??? I added the |
This is exactly what poetry does. If not specified explicit (https://python-poetry.org/docs/pyproject/#packages) Poetry will look for a folder with a normalized name of the project, that contains at least one |
Can you provide configuration so that the project always installs as --no-root? Maybe |
@kyleshrader yes, see #8650 |
FYI I encountered this problem today and I cannot follow the standard directory structure, so what helped me is to define
(It's a home assistant integration, therefore it has a fixed directory structure where the integration is in |
I'm also facing this issue. The message doesn't come off as a "warning" at all. |
First time I see warnings in bright red. |
To be fair: The warning starts in yellow and ends in yellow, only part of it is red. Nevertheless, the feedback makes it clear, that it's too confusing for many users if parts of a warning are printed in red. In the next release the warning will be prefixed with "Warning:" and printed completely in yellow. For future reference: The change will be made in #8650 since it will change the text of the warning anyway. Just to be clear: Even if it's fine to ignore the warning for now, you probably want to address it in the next Poetry release with #8650 because this warning will eventually become an error in a future release to resolve #8637. |
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. |
Issue
how to reproduce:
poetry install
the error may be here:
what i tried to do:
The text was updated successfully, but these errors were encountered: