Skip to content
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

Exception ignored in _io.TextIOWrapper when piping output to less #317

Open
harjoc opened this issue Aug 8, 2023 · 1 comment
Open

Exception ignored in _io.TextIOWrapper when piping output to less #317

harjoc opened this issue Aug 8, 2023 · 1 comment

Comments

@harjoc
Copy link

harjoc commented Aug 8, 2023

After installing q 3.1.6 on Ubuntu-20.04 with Python 3.8.10 and running q "select * from my.csv" | less, it logs this when exiting from less:

Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

When running without less, the above message is not logged.

@harjoc
Copy link
Author

harjoc commented Aug 8, 2023

For now I worked around it as described here:
https://stackoverflow.com/questions/14207708/ioerror-errno-32-broken-pipe-when-piping-prog-py-othercmd

from signal import signal, SIGPIPE, SIG_DFL
signal(SIGPIPE, SIG_DFL)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant