-
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 displays very verbose "broken pipe traceback" if output is not fully read #3602
Closed
3 tasks done
Closed
3 tasks done
Comments
maxnoe
added
kind/bug
Something isn't working as expected
status/triage
This issue needs to be triaged
labels
Jan 23, 2021
Yes, same issue here |
We also have a reallty weird behaviour regarding stdout: $ poetry show|grep toml
toml 0.10.2 Python Library for Tom's Obvious, Minimal Language
tomlkit 0.7.1 Style preserving TOML library But: poetry show|grep -q toml
Traceback (most recent call last):
File "<redacted>/lib/python3.9/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "<redacted>/lib/python3.9/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "<redacted>/lib/python3.9/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "<redacted>/lib/python3.9/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "<redacted>/lib/python3.9/site-packages/poetry/console/commands/show.py", line 256, in handle
self.line(line)
File "<redacted>/lib/python3.9/site-packages/cleo/commands/command.py", line 233, in line
self._io.write_line(styled, verbosity)
File "<redacted>/lib/python3.9/site-packages/cleo/io/io_mixin.py", line 65, in write_line
super(IOMixin, self).write_line(string, flags)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/io.py", line 66, in write_line
self._output.write_line(string, flags=flags)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/output.py", line 69, in write_line
self.write(string, flags=flags, new_line=True)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/output.py", line 61, in write
self._stream.write(to_str(formatted))
File "<redacted>/lib/python3.9/site-packages/clikit/io/output_stream/stream_output_stream.py", line 25, in write
self._stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<redacted>/bin/poetry", line 8, in <module>
sys.exit(main())
File "<redacted>/lib/python3.9/site-packages/poetry/console/__init__.py", line 5, in main
return Application().run()
File "<redacted>/lib/python3.9/site-packages/clikit/console_application.py", line 142, in run
trace.render(io, simple=isinstance(e, CliKitException))
File "<redacted>/lib/python3.9/site-packages/clikit/ui/components/exception_trace.py", line 232, in render
return self._render_exception(io, self._exception)
File "<redacted>/lib/python3.9/site-packages/clikit/ui/components/exception_trace.py", line 259, in _render_exception
self._render_line(
File "<redacted>/lib/python3.9/site-packages/clikit/ui/components/exception_trace.py", line 400, in _render_line
io.write_line("")
File "<redacted>/lib/python3.9/site-packages/cleo/io/io_mixin.py", line 65, in write_line
super(IOMixin, self).write_line(string, flags)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/io.py", line 66, in write_line
self._output.write_line(string, flags=flags)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/output.py", line 69, in write_line
self.write(string, flags=flags, new_line=True)
File "<redacted>/lib/python3.9/site-packages/clikit/api/io/output.py", line 61, in write
self._stream.write(to_str(formatted))
File "<redacted>/lib/python3.9/site-packages/clikit/io/output_stream/stream_output_stream.py", line 25, in write
self._stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe |
+1 |
I reckon this is more an issue in cleo/clikit rather than Poetry as the commands and IO are managed there. However if folks have workaround/mitigation , PRs welcome. |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: Manjaro
Poetry version: 1.1.4
Issue
When not reading all output of poetry, e.g. like this:
poetry displays a very verbose broken pipe error:
The text was updated successfully, but these errors were encountered: