[Tutor] UnicodeDecodeError

Isr Gish isrgish at fastem.com
Wed Feb 23 01:17:40 CET 2005


Michael Lange"<klappnase at freenet.de> wrote:
   >Hello list,
   >
[Snip]

This part of the error is saying what the problem is.

   >UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 22: ordinal not in range(128)
  
Thatthe ascii codec that's being used can't decode any ascii code above 128. And the code 0xe4 is higher then that.
You would have to use a different encoding, like msbc.
If i remmeber correctly you should do something like the following.

self.nextfile = self.nextfile.encode('msbc')
Then it should work.

If it doesn't work try posting what error you get.

All the best
Irr 



More information about the Tutor mailing list