Bug 612818 - python-eyed3's tool and library's tag.Mp3AudioFile method is broken
Summary: python-eyed3's tool and library's tag.Mp3AudioFile method is broken
Alias: None
Product: Fedora
Classification: Fedora
Component: python-eyed3   
(Show other bugs)
Version: 12
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Brian Pepple
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-09 06:55 UTC by Alex Butcher
Modified: 2010-12-03 13:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-12-03 13:24:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 223562 None None None Never

Description Alex Butcher 2010-07-09 06:55:47 UTC
Description of problem:

EyeD3 tool is broken because library's tag.Mp3AudioFile is broken.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. Run eyeD3 on an mp3 file (eyeD3 foo.mp3)
2. Observe traceback
Actual results:

$ eyeD3 01TheDrop.mp3 

01TheDrop.mp3	[ 2.41 MB ]
Uncaught exception: need more than 1 value to unpack
Traceback (most recent call last):
  File "/usr/bin/eyeD3", line 1215, in <module>
    retval = main();
  File "/usr/bin/eyeD3", line 1192, in main
    retval = app.handleFile(f);
  File "/usr/bin/eyeD3", line 504, in handleFile
    TagDriverBase.handleFile(self, f)
  File "/usr/bin/eyeD3", line 377, in handleFile
    self.audioFile = eyeD3.tag.Mp3AudioFile(f, self.opts.tagVersion);
  File "/usr/lib/python2.6/site-packages/eyeD3/tag.py", line 1623, in __init__
    hasTag = self.tag.link(f, tagVersion);
  File "/usr/lib/python2.6/site-packages/eyeD3/tag.py", line 474, in link
    padding = self.__loadV2Tag(f);
  File "/usr/lib/python2.6/site-packages/eyeD3/tag.py", line 1355, in __loadV2Tag
    padding = self.frames.parse(fp, self.header, self.extendedHeader);
  File "/usr/lib/python2.6/site-packages/eyeD3/frames.py", line 1809, in parse
    self.addFrame(createFrame(frameHeader, data, tagHeader))
  File "/usr/lib/python2.6/site-packages/eyeD3/frames.py", line 2175, in createFrame
  File "/usr/lib/python2.6/site-packages/eyeD3/frames.py", line 904, in __init__
  File "/usr/lib/python2.6/site-packages/eyeD3/frames.py", line 714, in __init__
    self._set(data, frameHeader);
  File "/usr/lib/python2.6/site-packages/eyeD3/frames.py", line 925, in _set
    (d, t) = splitUnicode(data[1:], self.encoding);
ValueError: need more than 1 value to unpack

Expected results:

Nominal output, including the contents of the ID3 tags.

Additional info:

Comment 1 Alex Butcher 2010-07-09 06:57:45 UTC
Likely root-cause of BZ 573384 too, I guess.

Comment 2 Alex Butcher 2010-07-09 07:04:30 UTC
Python API change?

Changing line 925 of /usr/lib/python2.6/site-packages/eyeD3/frames.py from

(d, t) = splitUnicode(data[1:], self.encoding);

(d, t) = splitUnicode(data[0:], self.encoding);

appears to fix this issue, but with unknown side-effects.

Comment 3 Brian Pepple 2010-07-09 12:41:57 UTC
Hmmm, works fine here.

[bpepple@localhost Desktop]$ eyeD3 /media/WD80/music/Articles\ of\ Faith/Core/01\ -\ i\'ve\ got\ mine.mp3 

01 - i've got mine.mp3	[ 6.19 MB ]
Time: 03:23	MPEG1, Layer III	[ 256 kb/s @ 44100 Hz - Dual channel stereo ]
ID3 v2.3:
title: I've Got Mine		artist: Articles Of Faith
album: Core		year: 1991
track: 1		genre: Alternative (id 20)

UserTextFrame: [Description: replaygain_track_gain]
-7.93 dB
UserTextFrame: [Description: replaygain_track_peak]
UserTextFrame: [Description: replaygain_album_gain]
-7.44 dB
UserTextFrame: [Description: replaygain_album_peak]

Comment 4 Alex Butcher 2010-07-09 13:22:54 UTC
My test MP3 was output by lame 3.98.3-1.fc12.1 and tagged by rubyripper's rrip_cli (I think).

Comment 5 Nicolas Nobelis 2010-07-26 17:55:06 UTC
Rubyripper 0.6 has a new behaviour when encoding with Lame : it creates a TXXX frame containing the discid.

$  id3v2 -l test.mp3

TYER (Year): 2009
TCON (Content type): Folk (80)
TXXX (User defined text information): (DISCID=8a097e0c): 

In fact, RR calls Lame with the parameter "--tv" : 

$ lame test.wav test.mp3 -V 3 --tv TXXX=DISCID="bc12bd0d"

Unfortunalely, it seems that eyeD3 chokes on this particular frame :

$ eyeD3 --debug test.mp3

eyeD3 trace> FrameSet: Reading Frame #5
eyeD3 trace> FrameHeader [start byte]: 125 (0x7D)
eyeD3 trace> FrameHeader [id]: TXXX (0x54585858)
eyeD3 trace> FrameHeader [data size]: 16 (0x10)
eyeD3 trace> FrameHeader [flags]: ta(0) fa(0) ro(0) co(0) en(0) gr(0) un(0) dl(0)
eyeD3 trace> FrameSet: Reading 16 (0x10) bytes of data from byte pos 135 (0x87)
eyeD3 trace> FrameSet: 16 bytes of data read
eyeD3 trace> UserTextFrame encoding: latin_1
Uncaught exception: need more than 1 value to unpack

However, I don't know if the bug lies in the frame generation by Lame or in the frame handling by eyeD3.
See http://www.id3.org/id3v2.3.0#head-29e37534e169ad913deb6a4fee345028f3db7c3f for the TXXX specs.

Hope it helps,


Comment 6 Nicolas Nobelis 2010-07-26 18:27:44 UTC
I just realized ! The TXXX frame generated by Rubyripper is invalid : only the description is set, with the value concatenated to the description !

$  id3v2 -l test.mp3
TXXX (User defined text information): (DISCID=8a097e0c): 

Notice the position of the final colon : the TXXX description is DISCID=8a097e0c and the TXXX value is nil. It should be the cause of the eyeD3 crash.

However, I don't see how, through the Lame command line, specify a TXXX frame : the description string must be terminated, which seems impossible to do through the shell ?

I'll report this to RR devs, maybe they will find something.

Comment 7 Bug Zapper 2010-11-03 12:15:29 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 8 Bug Zapper 2010-12-03 13:24:08 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.