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

Crash when output passed to pipe #625

Open
WGroleau opened this issue Mar 12, 2024 · 2 comments
Open

Crash when output passed to pipe #625

WGroleau opened this issue Mar 12, 2024 · 2 comments

Comments

@WGroleau
Copy link

WGroleau commented Mar 12, 2024

Doesn't matter what command is downstream of the pipe.  If I pipe to ls, I get the same exception, but then ls lists the directory.  Crash reproduced with several MP3 files, but without pipe, eyeD3 (and the alias) works as expected on all of them.

Blank lines between commands added for readability:

WGroleau@MBP I Could Sing of Your Love Forever 2 % alias ID3
ID3='eyeD3 --to-v2.4 --encoding utf8 --fs-encoding utf8'

WGroleau@MBP I Could Sing of Your Love Forever 2 % ID3 2-02* | head -1
... Sing of Your Love Forever 2/2-02 Open the Eyes of My Heart.mp3[ 3.88 MB ]
[Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

WGroleau@MBP I Could Sing of Your Love Forever 2 % eyeD3 --vers
0.9.6

WGroleau@MBP I Could Sing of Your Love Forever 2 % ID3 2-02*          
... Sing of Your Love Forever 2/2-02 Open the Eyes of My Heart.mp3            [ 3.88 MB ]
------------------------------------------------------------------------------------------
Time: 04:06	MPEG1, Layer III	[ 128 kb/s @ 44100 Hz - Joint stereo ]
------------------------------------------------------------------------------------------
ID3 v2.4:
title: Open the Eyes of My Heart
artist: SONICFLOOd
album: I Could Sing of Your Love Forever 2
album artist: Various Artists
composer: Paul Baloche
recording date: 2001
track: 2/12		genre: Duplicate (id None)
disc: 2/2
Comment: [Description: ] [Lang: eng]
Language
Lyrics: [Description: ] [Lang: eng]
[ Get Lyrical : http://lyrics.wikia.com/Sonicflood:Open_The_Eyes_Of_My_Heart ]
OTHER Image: [Size: 115145 bytes] [Type: image/jpeg]
Description: 

Writing ID3 version v2.4
------------------------------------------------------------------------------------------

WGroleau@MBP I Could Sing of Your Love Forever 2 % locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

WGroleau@MBP I Could Sing of Your Love Forever 2 % 
@WGroleau
Copy link
Author

Not sure where the bug is (which end of the pipe).
If the second command is head or ls the command works and the exception info is after that.
If the second command is tail or more, the command works and there is no exception.

@WhitePeter
Copy link

Even though your original report lacks information on what is going on and being done, I think I know what the problem is. As a workaround you can try using mbuffer as the first consumer of the pipeline, e.g.:

eyeD3 ... | mbuffer | head -1

I intend to prepare a PR to fix this but have other issues on my plate, so it might take a while. If someone else wants to jump on this, they should not wait on me. ;-)

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

2 participants