question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BrokenPipeError when `poetry show -v | head -n 1`

See original GitHub issue
  • 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 when head 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.)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pmav99commented, Feb 9, 2019

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.

0reactions
stale[bot]commented, Nov 20, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bash - How can I fix a Broken Pipe error? - Super User
Seeing "Broken pipe" in this situation is rare, but normal. When you run type rvm | head -1 , bash executes type rvm...
Read more >
Piping to head results in broken pipe in shell script called from ...
If one of the parent processes traps sigpipe , then the pipeline will inherit the ignore signal disposition, which will cause this problem ......
Read more >
Broken Pipe Error in Python - GeeksforGeeks
Thus upstream process in a python problem will raise an error such as IOError: Broken pipe error will occur.
Read more >
Access Authenticated Using an AK/SK - 华为云
As shown in the following figure, the file contains the username, AK, and SK. Figure 1 Content of the credential.csv file.
Read more >
Untitled
Yamaha t max 500 abs 2008, Cts v vs m5 2014, 407 mini truck, Laberinto de ... Sabbu quibids, Ab 32 cap and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found