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

Uncaught exception: Unable to covert the following frames to version v2.3: TMOO #474

Open
schenklklopfer opened this issue Aug 24, 2020 · 10 comments

Comments

@schenklklopfer
Copy link

eyeD3 dies trying to convert an ID3 v2.3 to v2.3 that contains TMOO field.

Tested in Ubuntu default version 0.8.4:

Writing ID3 version v2.3
Uncaught exception: Unable to covert the following frames to version v2.3: TMOO

eyed3:ERROR: Unable to covert the following frames to version v2.3: TMOO
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/eyed3/main.py", line 277, in _main
    retval = mainFunc(args, config)
  File "/usr/lib/python3/dist-packages/eyed3/main.py", line 50, in main
    fs_encoding=args.fs_encoding)
  File "/usr/lib/python3/dist-packages/eyed3/utils/__init__.py", line 113, in walk
    handler.handleFile(os.path.abspath(path))
  File "/usr/lib/python3/dist-packages/eyed3/plugins/classic.py", line 513, in handleFile
    max_padding=max_padding)
  File "/usr/lib/python3/dist-packages/eyed3/id3/tag.py", line 812, in save
    self.version = version
  File "/usr/lib/python3/dist-packages/eyed3/id3/tag.py", line 224, in version
    converted = self._convertFrames(std, non, v)
  File "/usr/lib/python3/dist-packages/eyed3/id3/tag.py", line 1190, in _convertFrames
    unconverted))
eyed3.id3.tag.TagException: Unable to covert the following frames to version v2.3: TMOO

Tested in the newest version 0.9.5 (installed via pip3):

Writing ID3 version v2.3
Uncaught exception: Unable to convert the following frames to version v2.3: TMOO

eyed3:ERROR: Unable to convert the following frames to version v2.3: TMOO
Traceback (most recent call last):
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/main.py", line 276, in _main
    retval = mainFunc(args, config)
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/main.py", line 42, in main
    recursive=recursive)
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/utils/__init__.py", line 71, in walk
    handler.handleFile(os.path.abspath(path))
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/plugins/classic.py", line 504, in handleFile
    max_padding=max_padding)
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/id3/tag.py", line 898, in save
    self.version = version
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/id3/tag.py", line 221, in version
    converted = self._convertFrames(std, non, v)
  File "/home/schenkl/.local/lib/python3.6/site-packages/eyed3/id3/tag.py", line 1293, in _convertFrames
    raise TagException("Unable to convert the following frames to "
eyed3.id3.tag.TagException: Unable to convert the following frames to version v2.3: TMOO

Workaround --text-frame="TMOO:" removes TMOO field before converting.

File was created by importing a CD into iTunes.

@nicfit
Copy link
Owner

nicfit commented Aug 27, 2020

eyed3.id3.tag.TagException: Unable to covert the following frames to version v2.3: TMOO

This is due to ID3 v2.3 not supporting TMOO. eyeD3 COULD put these in a TXXX with description: 'mood', but that's not too portable. i.e. Would TXXX:mood convert to TMOO? prolly, but that is very eyeD3 specific, but would allow conversions without exceptions.

@schenklklopfer
Copy link
Author

I do not know why my original ID3 v2.3 file could contain TMOO, due it is not possible, but it did.
So eyeD3 crashed.

As ID3 v2.3 does not support TMOO, so maybe just remove it instead of getting crashed trying to do something that cannot work?

@nicfit
Copy link
Owner

nicfit commented Aug 29, 2020

Sounds like you have a IDv2.4 tag where it is valid and you are trying to convert to 2.3 where it is not. If you feel like sharing the file it's be a good addition to my test set.

@schenklklopfer
Copy link
Author

The file is v2.3 not 2.4. That's why i am wondering how it could have TMOO, but eyeD3 seems to detect this field in this file.

I managed to remove the audio from the file that only the ID3 tag is left.
With this file you can test it.
How can I send you this file? Mail?

@nicfit
Copy link
Owner

nicfit commented Sep 1, 2020

If you zip it you can attach to this github issue. Thanks. TMOO is not legit in 2.3 but I'm not surprised you have one with it, tags are generally mayhem with respect to the specs. Apple just invented new frames, etc.

@schenklklopfer
Copy link
Author

I've attached it here.
broken.zip

Just unzip it, and try it.
eyeD3 --to-v2.3 broken.mp3 will fail with the exception above.

@flipMWD
Copy link

flipMWD commented May 17, 2021

I'm attempting to remove cover arts from mp3 files using eyeD3 --remove-all-images --max-padding 1, and a few of those songs with the RGAD (ReplayGain Adjustment) tag are throwing similar errors:

eyed3:ERROR: Unable to convert the following frames to version v2.3: RGAD
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/eyed3/main.py", line 276, in _main
    retval = mainFunc(args, config)
  File "/usr/lib/python3.9/site-packages/eyed3/main.py", line 41, in main
    eyed3.utils.walk(args.plugin, p, excludes=args.excludes, fs_encoding=args.fs_encoding,
  File "/usr/lib/python3.9/site-packages/eyed3/utils/__init__.py", line 71, in walk
    handler.handleFile(os.path.abspath(path))
  File "/usr/lib/python3.9/site-packages/eyed3/plugins/classic.py", line 500, in handleFile
    self.audio_file.tag.save(
  File "/usr/lib/python3.9/site-packages/eyed3/id3/tag.py", line 898, in save
    self.version = version
  File "/usr/lib/python3.9/site-packages/eyed3/id3/tag.py", line 221, in version
    converted = self._convertFrames(std, non, v)
  File "/usr/lib/python3.9/site-packages/eyed3/id3/tag.py", line 1293, in _convertFrames
    raise TagException("Unable to convert the following frames to "
eyed3.id3.tag.TagException: Unable to convert the following frames to version v2.3: RGAD

The error remains even after deleting the ReplayGain tags. This only happen to a few, not all songs with ReplayGain.

This is the output for id3v2 -l for one of the songs in particular:

id3v1 tag info for 01 Beast In Black.mp3:
Title  : Beast in Black                  Artist: Beast In Black
Album  : Berserker                       Year: 2017, Genre: Unknown (255)
Comment:                                 Track: 1
id3v2 tag info for 01 Beast In Black.mp3:
TIT2 (Title/songname/content description): Beast in Black
TPE1 (Lead performer(s)/Soloist(s)): Beast In Black
TRCK (Track number/Position in set): 1/12
TALB (Album/Movie/Show title): Berserker
TCON (Content type): Heavy Power Metal (255)
TYER (Year): 2017
POPM (Popularimeter): no@email, counter=0 rating=196TPE2 (Band/orchestra/accompaniment): Beast In Black
TXXX (User defined text information): (replaygain_album_gain): -7.15 dB  // apparently
TXXX (User defined text information): (replaygain_track_gain): -7.01 dB  // these lines
TXXX (User defined text information): (replaygain_track_peak): 0.923401  // are irrelevant
APIC (Attached picture): ()[, 3]: image/jpeg, 207861 bytes
RGAD ():  frame    // this is the only line that's common among the problematic files

Edit: ReplayGain values are not the issue. Check comments above.
Edit (Solved): All it needs to be done is to run eyeD3 --remove-frame RGAD, remove the images later.

@Nightfirecat
Copy link

I'm encountering the same issue for a TKY2 tag. Similar to flipMWD's comment, id3v2 lists it as an empty frame.

@nicfit
Copy link
Owner

nicfit commented Jul 28, 2022

@Nightfirecat That's not a standard ID3 frame.

@michaelkrieger
Copy link

michaelkrieger commented Jan 31, 2024

Edit: Opened a new issue at #618

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

5 participants