google-code-export / beets

Automatically exported from code.google.com/p/beets
MIT License
0 stars 0 forks source link

TB when changing a track's year #449

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
$ beet mod "xxxx" year=1998
Modifying 1 items.
* xxxx
  year: 2006 -> 1998
Really modify and write tags (Y/n)? 
Traceback (most recent call last):
  File "/usr/local/bin/beet", line 9, in <module>
    load_entry_point('beets==1.0b15', 'console_scripts', 'beet')()
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/__init__.py", line 764, in main
    subcommand.func(lib, config, suboptions, subargs)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 1151, in modify_func
    not opts.yes)
  File "/usr/local/lib/python2.7/dist-packages/beets/ui/commands.py", line 1126, in modify_items
    item.write()
  File "/usr/local/lib/python2.7/dist-packages/beets/library.py", line 285, in write
    setattr(f, key, getattr(self, key))
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 439, in __set__
    p[style.pack_pos] = val
  File "/usr/local/lib/python2.7/dist-packages/beets/mediafile.py", line 258, in __setitem__
    elems.append( ('%0' + str(field_lengths[i]) + 'i') % item )
TypeError: %d format: a number is required, not unicode

But the change was done in the file tags (checked with id3tool) and I guess in 
the DB too since beet ls -f '$year' "xxxx" print the new date

Original issue reported on code.google.com by braun...@gmail.com on 14 Oct 2012 at 11:12

GoogleCodeExporter commented 9 years ago
Thanks. I've pushed a fix for this in hg changeset e953b05d00e0. Let me know if 
the problem still exists in the latest source.

Original comment by adrian.sampson on 15 Oct 2012 at 3:29

GoogleCodeExporter commented 9 years ago
Seems fine now, thanks Adrian

Original comment by braun...@gmail.com on 17 Oct 2012 at 1:31