eyed3 crashes with exception (on empty BPM tag?)

Bug #608663 reported by Dave Holland on 2010-07-22
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eyed3 (Debian)
Fix Released
Unknown
eyed3 (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: python-eyed3

When parsing particular mp3 files, which I think contain an
empty BPM tag, this happens:

01 - Spirit.mp3 [ 6.18 MB ]
-------------------------------------------------------------------------------
Time: 02:32 MPEG1, Layer III [ 320 kb/s @ 48000 Hz - Stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Spirit artist: Eluveitie
album: Spirit year: 2006
track: 1/11 genre: Black Metal (id 138)
Uncaught exception: empty string for float()
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 566, in handleFile
    self.printTag(self.tag);
  File "/usr/bin/eyeD3", line 969, in printTag
    bpm = tag.getBPM();
  File "/usr/lib/pymodules/python2.6/eyeD3/tag.py", line 986, in getBPM
    bpm = int(float(bpm[0].text) + 0.5)
ValueError: empty string for float()

I've attached a tiny patch which makes this problem go away.

But there might be other places in tag.py where extra robustness like
that would be useful.

This is eyed3 version 0.6.17-1build1 on Ubuntu 10.04, up-to-date with patches as of today.

Related branches

Dave Holland (dh3) wrote :
Dave Holland (dh3) wrote :

I've also sent this report and patch to the upstream author.

tags: added: patch
Kamus (kamus) wrote :

@dave, please could you publish the url of upstream report to include to your report? Thanks

Changed in eyed3 (Ubuntu):
importance: Undecided → Medium
Dave Holland (dh3) wrote :

Hi, there's no URL, sorry - it was a direct email to the author, Travis Shirk. The address I sent it to is in /usr/share/doc/eyed3/copyright

tags: added: patch-forwarded-upstream
tags: removed: patch
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package eyed3 - 0.6.17-1ubuntu1

---------------
eyed3 (0.6.17-1ubuntu1) oneiric; urgency=low

  * Apply patch from Dave Holland to handle empty BPM tag
    that would have caused an unhandled exception.
    (LP: #608663)
  * Convert to dh_python2.
 -- Daniel T Chen <email address hidden> Sat, 30 Jul 2011 12:59:14 -0400

Changed in eyed3 (Ubuntu):
status: New → Fix Released
Changed in eyed3 (Debian):
status: Unknown → New
Changed in eyed3 (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.