Classic plugin does not handle --add-image with the optional [:DESCRIPTION] correctly

Issue #18 resolved
Former user created an issue

This Windows console command line

c:\python27\python -m eyed3.main  --plugin=classic --to-v2.3 --add-image="dido-a
nd-aeneas-pierre-narcisse-guerin-detail.jpg:ILLUSTRATION:Guerin (detail)" "15 Harm's Our Delight RR Bass.mp3"

results in the following traceback:

[1m[32m15 HarmÆs Our Delight RR Bass.mp3[0m  [32m[ 461.49 KB ][0m
[33mAdding image dido-and-aeneas-pierre-narcisse-guerin-detail.jpg[0m
eyed3.plugins.classic:ERROR: Traceback (most recent call last):
  File "c:\python27\lib\site-packages\eyed3\plugins\", line 401, in handleFile
    save_tag = (self.handleEdits(self.audio_file.tag) or
  File "c:\python27\lib\site-packages\eyed3\plugins\", line 835, in handleEdits
    tag.images.set(img_type,, img_mt, img_desc)
  File "c:\python27\lib\site-packages\eyed3\utils\", line 155, in wrapped_fn
    return fn(*args, **kwargs)
  File "c:\python27\lib\site-packages\eyed3\id3\", line 1205, in set
  File "c:\python27\lib\site-packages\eyed3\utils\", line 154, in wrapped_fn
    (fn.__name__, name))
TypeError: __init__(argument description) must be unicode

It does not seem to matter what is in the string.

The garbage "←[1m←[32m" in the output is untranslated ANSI terminal codes that Windows console does not support. (There really ought to be a way to switch them off, but that's a cosmetic issue that I'm not reporting as a problem.)

Comments (6)

  1. Log in to comment