-
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
poetry show gives a RunTimeError when not in the right directory #5411
Comments
This happens to me with every poetry command, when pyproject.toml is not present. Ubuntu 20.04
|
There are several open issues talking about the ugly output poetry gives on any error, #5559 looks like the furthest progressed try at doing something about it (and lists some duplicates). |
This was fixed with #5766, and will be part of the upcoming 1.2 release. It now looks like: $ poetry show
Poetry could not find a pyproject.toml file in /path/to/cwd or its parents |
I have a question about this, if I may. Does this mean that it's necessary to change directory to the poetry project folder (where the pyproject.toml is) to execute the python code in that project? Isn't there any way to do so from outside that folder? I'm pretty sure pipenv allows me to do something like Thanks a lot. |
@msoutopico: Since Poetry 1.3 you can use the global parameter
|
Thanks a lot @finswimmer . I had tried that with poetry 1.3.1 but I might be doing something wrong. I do:
but that gives me "Poetry could not find a pyproject.toml file in /home/souto/ or its parents". It does work however if I do:
Could you give me any tip? I hope this is a good place to ask. Apologies if it's not, in which case I'll try in Discord. |
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. |
-vvv
option).Issue
When you run "poetry show" command outside a poetry directory we get a RunTimeError with the following tracking information. Wouldn't it be preferable to show an error message in this case and exit the program gracefully?
For example, running
git status
on a non-git directory gives the following output:The text was updated successfully, but these errors were encountered: