openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #12130
[Bug 1007854] Re: error when print Stock Level Forecast in chinese
*** This bug is a duplicate of bug 956798 ***
https://bugs.launchpad.net/bugs/956798
Hello,
First thank you for your reply.I have check the lp:974977 and bug #956798.I think there is two issue:
1. "TypeError: coercing to Unicode: need string or buffer, tuple found" I found this problem in many other menu. In my opinion the problem about to show the error message(with some Unicode Character。Eg. Chinese)
2.There is a problem about the PYchart to print the Chinese. (This issue is also existing in v6.0.x)
This is the server Log:
2012-06-05 09:30:33,884 14001 ERROR ? openerp.service.web_services: Exception: 'ascii' codec can't decode byte 0xe4 in position 1: ordinal not in range(128)
Traceback (most recent call last):
File "/home/joshua/oe/server/6.1/openerp/service/web_services.py", line 727, in go
(result, format) = obj.create(cr, uid, ids, datas, context)
File "/home/joshua/oe/addons/6.1/stock/report/product_stock.py", line 108, in create
gt.draw()
File "/home/joshua/oe/addons/6.1/stock/report/stock_graph.py", line 101, in draw
ar.draw(self._canvas)
File "/usr/lib/pymodules/python2.7/pychart/area.py", line 248, in draw
self.legend.draw(self, legends, can)
File "/usr/lib/pymodules/python2.7/pychart/legend.py", line 144, in draw
max_label_width[col] = max(l.label_width(), max_label_width[col])
File "/usr/lib/pymodules/python2.7/pychart/legend.py", line 44, in label_width
return font.text_width(" " + self.label)
File "/usr/lib/pymodules/python2.7/pychart/font.py", line 444, in text_width
(xmin, xmax, d1, d2) = get_dimension(text)
File "/usr/lib/pymodules/python2.7/pychart/font.py", line 412, in get_dimension
(xmax, ymax, halign, valign, angle) = unaligned_get_dimension(text)
File "/usr/lib/pymodules/python2.7/pychart/font.py", line 375, in unaligned_get_dimension
for line in unicode(text).split('\n'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 1: ordinal not in range(128)
2012-06-05 09:30:34,041 14001 ERROR ? openerp.netsvc: ascii
中文产品
1
2
ordinal not in range(128)
(<type 'exceptions.UnicodeDecodeError'>, UnicodeDecodeError('ascii', ' \xe4\xb8\xad\xe6\x96\x87\xe4\xba\xa7\xe5\x93\x81', 1, 2, 'ordinal not in range(128)'), <traceback object at 0xc1b65cc>)
2012-06-05 09:30:34,042 14001 ERROR ? openerp.addons.web.common.http.HttpRequest.dispatch: An error occurred while handling a json request
Traceback (most recent call last):
File "/home/joshua/oe/web/6.1/addons/web/common/http.py", line 260, in dispatch
r = method(controller, self, **self.params)
File "/home/joshua/oe/web/6.1/addons/web/controllers/main.py", line 1833, in index
req.session._db, req.session._uid, req.session._password, report_id)
File "/home/joshua/oe/web/6.1/addons/web/common/openerplib/main.py", line 117, in proxy
result = self.connector.send(self.service_name, method, *args)
File "/home/joshua/oe/web/6.1/addons/web/common/http.py", line 596, in send
fault = xmlrpclib.Fault('warning -- ' + e.name + '\n\n' + e.value, '')
TypeError: coercing to Unicode: need string or buffer, tuple found
ubuntu 11.10
openerp-server version:4194
openerp-web version: 2498
Thank you
Joshua
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1007854
Title:
error when print Stock Level Forecast in chinese
Status in OpenERP Server:
New
Bug description:
Hi All,
It Seems the PYchart don`t support Chinese.
Any Solution?
Thank you
Joshua
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1007854/+subscriptions
References