Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in

Reply
Thread Tools

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in

 
 
Gabriel Genellina
Guest
Posts: n/a
 
      10-21-2008
En Thu, 16 Oct 2008 00:16:13 -0300, MOS37F MOS37F <>
escribió:

> import shelve
> from ShelfFile import ABC
> from zipfile import ZipFile, ZIP_DEFLATED
> ShelfFilePath = 'E:\DIR\DIR\DIR\ShelfFile'


If you want some kind of answer:

- shorten the code to the minimum fragment that still shows the problem
- don't use non-standard modules
- try to ask a specific question: what input you used, what output you
were expecting, and what you actually got.

As a general comment, instead of 'E:\DIR\DIR\DIR\ShelfFile' use either:
'E:\\DIR\\DIR\\DIR\\ShelfFile' or
r'E:\DIR\DIR\DIR\ShelfFile'
See http://www.python.org/doc/faq/general/#id54

> FilePath1 = RetrievedObject.DirectoryPath1 + '\\' + 'Filename.txt'


and os.path.join in this case.

--
Gabriel Genellina

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in Anjanesh Lekshminarayanan Python 0 01-29-2009 04:24 PM
[2.5.1] "UnicodeDecodeError: 'ascii' codec can't decode byte"? Gilles Ganault Python 3 10-29-2008 11:29 AM
UnicodeDecodeError: 'ascii' codec can't decode byte Gilles Ganault Python 2 06-17-2008 09:09 PM
Long way around UnicodeDecodeError, or 'ascii' codec can't decode byte Oleg Parashchenko Python 4 03-31-2007 05:07 PM
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 10: ordinal not in range(128) Robin Siebler Python 4 10-08-2004 08:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57