When trying to print a an invoice I get:
2014-07-29 06:08:51,048 1057 ERROR openerp openerp.service.web_services: Exception: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
Traceback (most recent call last):
File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 712, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 442, in create
fnct_ret = fnct(cr, uid, ids, data, report_xml, context)
File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 476, in create_source_pdf
result = self.create_single_pdf(cr, uid, [obj.id], data, report_xml, context)
File "/opt/openerp-7.0-20140728-231228/openerp/report/report_sxw.py", line 533, in create_single_pdf
pdf = create_doc(etree.tostring(processed_rml),rml_parser.localcontext,logo,title.encode('utf8'))
File "/opt/openerp-7.0-20140728-231228/openerp/report/interface.py", line 206, in create_pdf
obj.render()
File "/opt/openerp-7.0-20140728-231228/openerp/report/render/render.py", line 59, in render
self._result = self._render()
File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml.py", line 41, in _render
return rml2pdf.parseNode(self.rml, self.localcontext, images=self.bin_datas, path=self.path,title=self.title)
File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 1032, in parseNode
r.render(fp)
File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 328, in render
pt_obj.render(el)
File "/opt/openerp-7.0-20140728-231228/openerp/report/render/rml2pdf/trml2pdf.py", line 1012, in render
self.doc_tmpl.build(fis)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 890, in build
self.handle_flowable(flowables)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py", line 773, in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/frames.py", line 161, in _add
w, h = flowable.wrap(aW, h)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 1173, in wrap
self._calc(availWidth, availHeight)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 625, in _calc
self._calc_height(availHeight,availWidth,W=W)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 556, in _calc_height
dW,t = self._listCellGeom(v,w or self._listValueWidth(v),s)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line 397, in _listCellGeom
vw, vh = v.wrapOn(canv, aW, aH)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/flowables.py", line 121, in wrapOn
w, h = self.wrap(aW,aH)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 1036, in wrap
blPara = self.breakLines([first_line_width, later_widths])
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 1244, in breakLines
words[0:0] = _splitWord(word,maxWidth-spaceWidth-currentWidth,maxWidths,lineno,fontName,fontSize,self.encoding)
File "/usr/lib/python2.7/dist-packages/reportlab/platypus/paragraph.py", line 553, in _splitWord
R.append(_SplitText(wordText))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u010d' in position 6: ordinal not in range(128)
2014-07-29 06:08:51,171 1057 ERROR openerp openerp.netsvc: ascii
Jediničn
6
7
ordinal not in range(128)
(<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Jedini\u010dn', 6, 7, 'ordinal not in range(128)'), <traceback object at 0x7f323abdb9e0>)
Traceback (most recent call last):
File "/opt/openerp-7.0-20140728-231228/openerp/netsvc.py", line 296, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 654, in dispatch
res = fn(db, uid, *params)
File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 760, in exp_report_get
return self._check_report(report_id)
File "/opt/openerp-7.0-20140728-231228/openerp/service/web_services.py", line 738, in _check_report
netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
File "/opt/openerp-7.0-20140728-231228/openerp/netsvc.py", line 71, in abort_response
raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'ascii\nJedini\u010dn\n6\n7\nordinal not in range(128)', (<type 'exceptions.UnicodeEncodeError'>, UnicodeEncodeError('ascii', u'Jedini\u010dn', 6, 7, 'ordinal not in range(128)'), <traceback object at 0x7f323abdb9e0>))
2014-07-29 06:08:51,174 1057 INFO openerp werkzeug: 127.0.0.1 - - [29/Jul/2014 06:08:51] "POST /web/report HTTP/1.1" 500 -
The language is set to Croatian.
The above error seems to occur when the po files are read for the report like /openerp/addons/account/i18n/hr.po and then it doesn't understand characters like č. Or it can't encode č, I don't know really.
On which operating system and version?
This is on Ubuntu 14.4.
This same setup is working on gentoo ( latest).
Thanks