Package: eyed3
Version: 0.6.18-1
Severity: normal

Dear Maintainer,

When the title, artist, album and year, but not the genre of a track is set,
renaming fails, but if the genre is set, it succeeds:

$ eyeD3 --rename='%a' 01.mp3 

01.mp3  [ 2.75 MB ]
-------------------------------------------------------------------------------
Time: 03:00     MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Ist das noch Punkrock?           artist: Die Ärzte
album: Auch             year: 2012
track: 
Uncaught exception: 'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/usr/bin/eyeD3", line 1265, in <module>
    retval = main();
  File "/usr/bin/eyeD3", line 1242, in main
    retval = app.handleFile(f);
  File "/usr/bin/eyeD3", line 587, in handleFile
    self.opts.fs_encoding);
  File "/usr/bin/eyeD3", line 934, in handleRenames
    name = f.getTag().tagToString(pattern);
  File "/usr/lib/python2.7/dist-packages/eyeD3/tag.py", line 1063, in 
tagToString
    s = self._subst(s, "%G", self.getGenre().name)
AttributeError: 'NoneType' object has no attribute 'name'

$ eyeD3 -G 43 01.mp3 

01.mp3  [ 2.75 MB ]
-------------------------------------------------------------------------------
Time: 03:00     MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
Setting track genre: 43
Writing tag...
ID3 v2.4:
title: Ist das noch Punkrock?           artist: Die Ärzte
album: Auch             year: 2012
track:          genre: Punk (id 43)

$ eyeD3 --rename="%A - %t" 01.mp3

01.mp3  [ 2.75 MB ]
-------------------------------------------------------------------------------
Time: 03:00     MPEG1, Layer III        [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: Ist das noch Punkrock?           artist: Die Ärzte
album: Auch             year: 2012
track:          genre: Punk (id 43)
Renaming file to 'Die Ärzte - Ist das noch Punkrock?'


-- System Information:
Debian Release: 8.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages eyed3 depends on:
ii  python        2.7.9-1
ii  python-eyed3  0.6.18-1

eyed3 recommends no packages.

eyed3 suggests no packages.

-- no debconf information

Reply via email to