UnicodeDecodeError

ash ashokagk at gmail.com
Wed Nov 30 11:27:34 EST 2005


hi,
one of the modules in my programs stopped wroking after i upgraded from
python 2.3 to 2.4. I also changed my wxPython to unicode supported one
during the process.
 what the module essentially does is search for a stirng pattern form a
list of strings.
this is the function:

def srchqu(self):
    for i in range(1,len(qu)):#qu is the list of strings
        if qu[i][0].lower().find(self.query)==-1:
            pass
        else:
            #do some stuff here

I get this error message on calling the function:

Traceback (most recent call last):
  File "E:\mdi\search.py", line 86, in OnSrchButton
    self.srchqu()
  File "E:\mdi\search.py", line 97, in srchqu
    if qu[i][0].lower().find(self.query)==-1:
UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position
66: ordinal not in range(128)

what is the problem and the solution? thanks in advance for any help.

Ashoka




More information about the Python-list mailing list