Python - Finding unicode/ascii problems

Posted by user330739 on Stack Overflow See other posts from Stack Overflow or by user330739
Published on 2010-05-02T09:40:57Z Indexed on 2010/05/02 9:47 UTC
Read the original article Hit count: 215

Filed under:

Hi all,

I am csv.reader to pull in info from a very long sheet. I am doing work on that data set and then I am using the xlwt package to give me a workable excel file.

However, I get this error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 34: ordinal not in range(128)

My question to you all is, how can I find exactly where that error is in my data set? Also, is there some code that I can write which will look through my data set and find out where the issues lie (because some data sets run without the above error and others have problems)?

© Stack Overflow or respective owner

Related posts about python