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

Discussion in 'Python' started by Gabriel Genellina, Oct 21, 2008.

  1. 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
     
    Gabriel Genellina, Oct 21, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robin Siebler
    Replies:
    4
    Views:
    26,426
    Tim Peters
    Oct 8, 2004
  2. Oleg  Parashchenko
    Replies:
    4
    Views:
    1,032
    Paul Boddie
    Mar 31, 2007
  3. Gilles Ganault
    Replies:
    2
    Views:
    1,101
    Gilles Ganault
    Jun 17, 2008
  4. Gilles Ganault
    Replies:
    3
    Views:
    1,945
    Steve Holden
    Oct 29, 2008
  5. Tim Golden
    Replies:
    0
    Views:
    105
    Tim Golden
    Nov 27, 2013
Loading...

Share This Page