[Python-modules-team] Bug#798137: python-rgain: fails when no ID3 tag is present

Christoph Anton Mitterer calestyo at scientia.net
Sun Sep 6 04:36:11 UTC 2015


Package: python-rgain
Version: 1.3.3-1
Severity: normal


Hey.

It seems that e.g. collectiongain fails when no ID3 tags are present.

E.g. when encoding files like:
$ lame -q 0 -v -V 4 --noreplaygain --id3v2-utf16 --add-id3v2 --id3v1-only <WAVs>
running
$ collectiongain dir/
would give:
Collecting files ...
  [1] 6.wav.mp3 | <single track>
  [2] 2.wav.mp3 | <single track>
  [3] 4.wav.mp3 | <single track>
  [4] 3.wav.mp3 | <single track>
  [5] 1.wav.mp3 | <single track>
  [6] 5.wav.mp3 | <single track>
Dispatching jobs ...
Now waiting for results ...
Unfortunately, there were some errors:
Checking for Replay Gain information ...
  1492/5.wav.mp3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/rgain/script/replaygain.py", line 85, in do_gain
    trackdata, albumdata = formats_map.read_gain(filename)
  File "/usr/lib/python2.7/dist-packages/rgain/rgio.py", line 391, in read_gain
    return accessor.read_gain(filename)
  File "/usr/lib/python2.7/dist-packages/rgain/rgio.py", line 283, in read_gain
    rgorg_track_gain, rgorg_album_gain = self.rgorg.read_gain(filename)
  File "/usr/lib/python2.7/dist-packages/rgain/rgio.py", line 85, in read_gain
    tags = self._get_tags_object(filename)
  File "/usr/lib/python2.7/dist-packages/rgain/rgio.py", line 191, in _get_tags_object
    return self._ReplaygainEasyID3(filename)
  File "/usr/lib/python2.7/dist-packages/mutagen/easyid3.py", line 173, in __init__
    self.load(filename)
  File "/usr/lib/python2.7/dist-packages/mutagen/id3/__init__.py", line 255, in load
    self._header = ID3Header(fileobj)
  File "/usr/lib/python2.7/dist-packages/mutagen/id3/__init__.py", line 108, in __init__
    raise ID3NoHeaderError("%r doesn't start with an ID3 tag" % fn)
ID3NoHeaderError: u'1492/5.wav.mp3' doesn't start with an ID3 tag


0 successful, 1 failed.
All finished.

However, when I add e.g. --tc ''
$ lame -q 0 -v -V 4 --noreplaygain --id3v2-utf16 --add-id3v2 --id3v1-only --tc ''
it works.

I'd guess that lame adds an id3v2 even without "--tc ''",... but even if not,
python-rgain should probably add a proper ID3 area itself, or at least
not give a stack trace =)


Cheers,
Chris.


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.1.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_DE.UTF-8, LC_CTYPE=en_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-rgain depends on:
ii  gir1.2-gstreamer-1.0       1.4.5-2
ii  gstreamer1.0-plugins-base  1.4.5-2
ii  gstreamer1.0-plugins-good  1.4.5-2+b2
ii  python                     2.7.9-1
ii  python-gi                  3.16.2-1
ii  python-mutagen             1.30-1

Versions of packages python-rgain recommends:
ii  gstreamer1.0-plugins-bad  1.4.5-3

python-rgain suggests no packages.

-- no debconf information



More information about the Python-modules-team mailing list