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

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Oct 21 04:00:09 EDT 2008


En Thu, 16 Oct 2008 00:16:13 -0300, MOS37F MOS37F <mos37f at gmail.com>  
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




More information about the Python-list mailing list