ValueError: min() arg is an empty sequence
Bug #410929 reported by
Chen Ming
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mutagen (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When I try to update a mp3 tag from gbk to utf8, I got following error:
cm@pet-
Updating AnXiang.mp3
Traceback (most recent call last):
File "/usr/bin/
main(sys.argv)
File "/usr/bin/
update(options, args)
File "/usr/bin/
if min(map(isascii, text)):
ValueError: min() arg is an empty sequence
To post a comment you must log in.
Here's a patch that seems to fix it for your affected file. I don't know if my tiny patch will cause other problems with the program, as I've never used this program before.
The problem seems to be that the TCON tag of that mp3 file is represented as completely blank by mutagen.id3 (i.e. []) where instead an empty tag should always be an empty string (i.e. [u''])
The thing I can't figure out is why the map function on line 76 returns an empty list.
>>> isascii(text)
True
>>> text
[]
>>> isascii(text)
True
>>> map(isascii, text)
[]
Shouldn't map return [True] instead of []?