Package: python-magic
Version: 5.03-1
Severity: normal
The 2 previous reports don't isolate the problem very well. I have a better
example:
--- cut here ---
import magic
magic= magic.open (magic.MAGIC_MIME)
magic.load ()
filename= u'/home/mdione/media/music/Charly Garc\xeda/Influencia/Influencia.png'
print filename.encode ('utf-8')
# prints '/home/mdione/media/music//Charly GarcĂa/Influencia/Influencia.png' as
spected
magic.file (filename)
--- cut here ---
The traceback shows this error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in
position 37: ordinal not in range(128)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-magic depends on:
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libmagic1 5.03-1 File type determination library us
python-magic recommends no packages.
Versions of packages python-magic suggests:
pn python-magic-dbg <none> (no description available)
-- no debconf information
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-magic depends on:
ii libc6 2.9-25 GNU C Library: Shared libraries
ii libmagic1 5.03-1 File type determination library us
python-magic recommends no packages.
Versions of packages python-magic suggests:
pn python-magic-dbg <none> (no description available)
-- no debconf information
--
(Not so) Random fortune:
The Strong Lusethropic Principle states: "The more idiot proof the software, the
more it encourages the user to be careless and not think. Therefore, idiot-proof
software actually encourages, contributes, and actually CAUSES lusers to be
stupid."
-- Ben Cantrick
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]