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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gabriel Genellina

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

    En Thu, 16 Oct 2008 00:16:13 -0300, MOS37F MOS37F <mos37f@gmail.c om>
    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\DI R\ShelfFile'
    See http://www.python.org/doc/faq/general/#id54
    FilePath1 = RetrievedObject .DirectoryPath1 + '\\' + 'Filename.txt'
    and os.path.join in this case.

    --
    Gabriel Genellina

Working...