Aeroo报告:生成报告时出错。 ASCII
我使用aeroo报告在openerp 7中生成xls报告,我创build了包含数据的ods文件作为input文件,并将xls作为输出
我用python函数返回阿拉伯string,
def _test(self, data): res=[] for item in data : month_move=datetime.strptime(str(item.date), '%Y-%m-%d %H:%M:%S').year if month_move == date.today().year: res.append(item) return res,'الاتبللا'
我有一些date是阿拉伯文信,当我试图打印报告,我得到这个错误信息:
Aeroo Reports: Error while generating the report. ascii
我得到这个错误,如果我使用的function,但如果我不使用它,报告生成正确,
我使用了Genshi包版本6.0,和libreoffice版本5.1,openerp版本7和python版本2.7
原谅我的坏英语,并感谢广告
看起来像第二个返回参数有一个编码问题:
'الاتبللا'
你并没有在Python 2中使用u
的string前缀。更好的是, 导入unicode_literals 。