← Back to team overview

openerp-community team mailing list archive

[SOLVED] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30: ordinal not in range(128)

 

I found this error installing project_gtd module on Openerp v6.1. I
tried this on Ubuntu11.10 and Fedora16, but i think it appear in all
Linux distributions.

The error appear when the test demostration data are not loaded, while
creating database (appear only with blank data).
When the modules project and project_gtd are loaded, click on the
"project" button, then on "My Tasks" option on the side menu.
This error appear:

Client Traceback (most recent call last):
  File "/bzr/6.1/web/trunk/addons/web/common/http.py", line 175, in
dispatch
    response["result"] = method(controller, self, **self.params)
  File "/bzr/6.1/web/trunk/addons/web/controllers/main.py", line 1071,
in load
    fields_view = self.fields_view_get(req, model, view_id, 'search')
  File "/bzr/6.1/web/trunk/addons/web/controllers/main.py", line 889, in
fields_view_get
    fvg = Model.fields_view_get(view_id, view_type, context, toolbar,
submenu)
  File "/bzr/6.1/web/trunk/addons/web/common/openerplib/main.py", line
430, in proxy
    *args)
  File "/bzr/6.1/web/trunk/addons/web/common/openerplib/main.py", line
306, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/bzr/6.1/web/trunk/addons/web/common/openerplib/main.py", line
276, in send
    raise fault

Server Traceback (most recent call last):
  File "/bzr/6.1/web/trunk/addons/web/common/openerplib/main.py", line
257, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/bzr/6.1/server/trunk/openerp/netsvc.py", line 325, in
dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method,
params)
  File "/bzr/6.1/server/trunk/openerp/service/web_services.py", line
580, in dispatch
    res = fn(db, uid, *params)
  File "/bzr/6.1/server/trunk/openerp/osv/osv.py", line 120, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/bzr/6.1/server/trunk/openerp/osv/osv.py", line 172, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/bzr/6.1/server/trunk/openerp/osv/osv.py", line 163, in
execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/bzr/6.1/addons/trunk/project_gtd/project_gtd.py", line 118, in
fields_view_get
    res['arch'] = res['arch'].replace('<separator name="gtdsep"/>',
search_extended)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 30:
ordinal not in range(128)

I solved the error modifying the line 118 of the file
/bzr/6.1/addons/trunk/project_gtd/project_gtd.py from:

res['arch'] = res['arch'].replace('<separator name="gtdsep"/>',
search_extended)

to:

res['arch'] = unicode(res['arch'], 'utf8').replace('<separator
name="gtdsep"/>', search_extended)

Hope to be useful
Eliumara López
-- 
This message was sent from Launchpad by
Eliumara Lopez (https://launchpad.net/~lopez.eliumara)
using the "Contact this team" link on the OpenERP Community team page
(https://launchpad.net/~openerp-community).
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople