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

Error when piping output into another program #2

Open
kortina opened this issue Oct 22, 2010 · 2 comments
Open

Error when piping output into another program #2

kortina opened this issue Oct 22, 2010 · 2 comments

Comments

@kortina
Copy link

kortina commented Oct 22, 2010

On os x, I had a list in my clipboard, did:
pbpaste | bar_chart.py -v |head -n 30

The chart works fin when I do not pipe into head, but I wanted to only show the top 30 items. Piping into head does limit to 30 rows, as expected, but at the end I also see this error output printed:

close failed in file object destructor:
Error in sys.excepthook:

Original exception was:

@ojilles
Copy link
Contributor

ojilles commented Mar 27, 2011

This just works fine for me... not sure what the problem is in your case:

    localhost:data_hacks ojilles$ cat b | ./bar_chart.py 
    # each * represents a count of 1
     1 1 [     1] *
     2 1 [     1] *
    3 11 [     1] *
     3 5 [     1] *
     4 5 [     1] *
     5 7 [     1] *
     5 8 [     1] *
     6 1 [     1] *
     6 5 [     1] *
    localhost:data_hacks ojilles$ cat b | ./bar_chart.py | head -n 3
    # each * represents a count of 1
     1 1 [     1] *
     2 1 [     1] *

@brxie
Copy link

brxie commented Jan 31, 2015

Same problem on Ubuntu 14.04. Fixed in #23

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

No branches or pull requests

3 participants