On Fri, Oct 8, 2010 at 3:31 PM, Pratik Khemka <pratikkhe...@hotmail.com>wrote:
> *UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position > 152: ordinal not in range(128)*. Can someone please help me with this > error > The error occurs in line *wbk.save(p4_merge.xls)*. I have used * > import xlwt*..Can someone just tell what do I need to do to get rid of > this error. I read other forums which explain the error but do not solve it. > Thanks in advance.. > > You're writing non-ascii data to the workbook, which is then trying to decode it using the default ascii encoding, which will fail. When you create the workbook, you need to specify the correct encoding, e.g.: wbk = xlwt.Workbook('utf-8') or whatever encoding you're actually using. Cheers, Ian
-- http://mail.python.org/mailman/listinfo/python-list