Re: odd unicode error
- From: "Martin v. Löwis" <martin@xxxxxxxxxxx>
- Date: Thu, 12 Apr 2007 20:38:19 +0200
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 1:
ordinal not in range(128)
Any ideas?
path is a Unicode string, b is a byte string and contains the
byte \xd0.
The problem is that you have a directory with file names in it that
cannot be converted to Unicode strings, using the file system
encoding. If you can't fix the file system, you have to make
search_path a byte string.
Regards,
Martin
.
- Follow-Ups:
- Re: odd unicode error
- From: tubby
- Re: odd unicode error
- References:
- odd unicode error
- From: tubby
- odd unicode error
- Prev by Date: Re: Newbie help with array handling
- Next by Date: Re: Inconsistent result from urllib.urlopen
- Previous by thread: odd unicode error
- Next by thread: Re: odd unicode error
- Index(es):
Relevant Pages
|