On 8/18/06, Tim Daneliuk <[EMAIL PROTECTED]> wrote:
> > try mutagen. http://www.sacredchao.net/quodlibet/wiki/Development/Mutagen
>
> This module is more-or-less exactly what I needed.  However, I am running
> into problems when the filenames or ID tags have unicode characters in them.
>
> Typically, I do something like:
>
> from mutagen.easyid3 import EasyID3
>
> audio["title'] = Something based on the filename that has unicode chars in it
>
> I then get this:
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xfc in position 56: 
> ordinal not in range(128)

>From the docs:
"""Mutagen has full Unicode support for all formats. When you assign
text strings, we strongly recommend using Python unicode objects
rather than str objects. If you use str objects, Mutagen will assume
they are in UTF-8."""

So I suppose the value you try to assign as title is not unicode,
check the encoding used in the file system.

Iñigo
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to