-
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
BrokenPipeError when poetry show -v | head -n 1
#839
Comments
Your traceback shows that the error lies within |
I feel that pipenv/poetry are not designed to handle non-web apps well: both make it very difficult to activate an env when your working dir is not I primarily work on "project/document" desktop/CLI apps, rather than web apps. It would be nice if I could:
instead of:
or
Should I file another bug report? |
You don't have to use poetry to handle virtualenvs. If a virtualenv is active, poetry will be happy to use it. So you can use pew or virtualenvwrapper or (I guess) conda to manage your virtualenvs and let poetry just handle the project's dependencies. |
Getting back to the actual error you brought up, it looks like you can avoid the error by doing this:
This solution is taken from this SO post. In short:
I'll create an issue in the P.S. - For what it's worth, I don't really do any web development at all, and I use |
It turns out that |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one. |
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. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Ubuntu 18.04 x64, zsh
Poetry version: 0.12.11
Link of a Gist with the contents of your pyproject.toml file: probably irrelevant
Issue
It was suggested on the issue tracker, that to "find the virtualenv path", I run
poetry show -v
and look at the first line.To automate that process, I tried executing
poetry show -v | head -n 1
in zsh. However whenhead
closes the pipe, Poetry instead raises BrokenPipeError.https://gist.github.com/jimbo1qaz/014f6e831af944db235e77af61339b49 (poetry show -vvv, not -v)
Is this a reasonable use case? Is it possible to catch this error and stop writing to stdout (or terminate)?
(Note: on Windows, depending on buffer size, subprocess.Popen pipes may produce OSError instead. But this is not a Popen pipe, but a shell pipe.)
The text was updated successfully, but these errors were encountered: