[pysqlite 2.0.2] UnicodeDecodeError: 'utf8' codec can't decode bytes in position 44-45: invalid data

Discussion in 'Python' started by F. GEIGER, May 27, 2005.

  1. F. GEIGER

    F. GEIGER Guest

    A fetchall() call causes the above error. There must be some non-utf8 chars
    in the table in question and - indeed - there very likely are: The table
    contains pathnames of files on the harddisk of a German "speaking" PC.

    What I have already done to try to overcome this is:
    - Inserted "# coding: iso-8859-1" (w/o the quotes) in (hopefully) every file
    of my project
    - All strings I could find prefixed with "u" (w/o the quotes)
    - Changed plain calls to execute(q) into execute(unicode(q))

    Alas, I am not sure if this all makes really sense, and, obviously it
    doesn't. What else has to be done?

    Many thanks in advance and kind regards
    Franz GEIGER
    F. GEIGER, May 27, 2005
    #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,118
    Tim Peters
    Oct 8, 2004
  2. Oleg  Parashchenko
    Replies:
    4
    Views:
    1,021
    Paul Boddie
    Mar 31, 2007
  3. iMath
    Replies:
    4
    Views:
    553
    iMath
    Dec 7, 2012
  4. Îίκος
    Replies:
    67
    Views:
    945
  5. Îίκος
    Replies:
    58
    Views:
    507
    Îίκος
    Oct 2, 2013
Loading...

Share This Page