UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal

opina 2013-10-16 02:48:07
Traceback (most recent call last):
File "C:/Python25/testPaython/terry3.py", line 40, in <module>
book.save('sales.xls')
File "C:\Python25\Lib\site-packages\xlwt\Workbook.py", line 634, in save
doc.save(filename, self.get_biff_data())
File "C:\Python25\Lib\site-packages\xlwt\Workbook.py", line 609, in get_biff_data
shared_str_table = self.__sst_rec()
File "C:\Python25\Lib\site-packages\xlwt\Workbook.py", line 571, in __sst_rec
return self.__sst.get_biff_record()
File "C:\Python25\Lib\site-packages\xlwt\BIFFRecords.py", line 53, in get_biff_record
self._add_to_sst(s)
File "C:\Python25\Lib\site-packages\xlwt\BIFFRecords.py", line 66, in _add_to_sst
u_str = upack2(s, self.encoding)
File "C:\Python25\Lib\site-packages\xlwt\UnicodeUtils.py", line 50, in upack2
us = unicode(s, encoding)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)






Traceback (most recent call last):
File "C:/Python25/testPaython/terry3.py", line 34, in <module>
sheet1.write(row,1,customerid.encode('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)



求各位大侠帮帮忙,很急
...全文
587 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
zara 2013-10-16
  • 打赏
  • 举报
回复
Python ? 不是有专门的板块吗?这里是汇编啊,和 Python 不相干的http://bbs.csdn.net/forums/OL_Script
opina 2013-10-16
  • 打赏
  • 举报
回复
Traceback (most recent call last): File "C:/Python25/testPaython/terry3.py", line 34, in <module> sheet1.write(row,1,customerid.encode('utf-8')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128)

21,458

社区成员

发帖
与我相关
我的任务
社区描述
汇编语言(Assembly Language)是任何一种用于电子计算机、微处理器、微控制器或其他可编程器件的低级语言,亦称为符号语言。
社区管理员
  • 汇编语言
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧