← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 662792] Re: Run server from a path with international characters like éíàã

 

*** This bug is a duplicate of bug 563029 ***
    https://bugs.launchpad.net/bugs/563029

** This bug has been marked a duplicate of bug 563029
   Problem of Unicode if root/addons path contains accented character(s).
 * You can subscribe to bug 563029 by following this link: https://bugs.launchpad.net/openobject-server/+bug/563029/+subscribe

-- 
Run server from a path with international characters like éíàã
https://bugs.launchpad.net/bugs/662792
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Server: New

Bug description:
Install openerp in a path with á à í ç ã õ...

To reply error do:
mkdir /home/usercátia/transferências/
cd /home/usercátia/transferências/
bzr branch lp:openerp
cd openerp
./bzr_set.py
... launch server and web client
It will generate following error on browser.

--------------------------------------------------------------------------------------------
<type 'exceptions.UnicodeDecodeError'>	Python 2.6.4: /usr/bin/python
Mon Oct 18 16:47:31 2010

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
 /usr/lib/python2.6/site-packages/cherrypy/_cprequest.py in respond(self=<cherrypy._cprequest.Request object at 0x8f610cc>, path_info='/')
  604                     if self.handler:
  605                         self.stage = 'handler'
  606                         cherrypy.response.body = self.handler()
  607                     
  608                     self.stage = 'before_finalize'
global cherrypy = <module 'cherrypy' from '/usr/lib/python2.6/site-packages/cherrypy/__init__.pyc'>, cherrypy.response = <cherrypy._ThreadLocalProxy object at 0x858322c>, cherrypy.response.body = [], self = <cherrypy._cprequest.Request object at 0x8f610cc>, self.handler = <cherrypy._cpdispatch.LateParamPageHandler object at 0x8f6120c>
 /usr/lib/python2.6/site-packages/cherrypy/_cpdispatch.py in __call__(self=<cherrypy._cpdispatch.LateParamPageHandler object at 0x8f6120c>)
   23     def __call__(self):
   24         try:
   25             return self.callable(*self.args, **self.kwargs)
   26         except TypeError, x:
   27             test_callable_spec(self.callable, self.args, self.kwargs)
self = <cherrypy._cpdispatch.LateParamPageHandler object at 0x8f6120c>, self.callable = <function index at 0x8f6041c>, self.args = (), self.kwargs = {}
 /home/Colégio/Informática/OpenERP/openerp/web/openerp/controllers/base.py in wrapper(*args=(), **kw={})
  157 
  158                 return login(cherrypy.request.path_info, message=message,
  159                         db=db, user=user, action=action, origArgs=get_orig_args(kw))
  160 
  161             # Authorized. Set db, user name in cookies
db = None, user = None, action = None, origArgs undefined, get_orig_args = <function get_orig_args at 0x8f603e4>, kw = {}
 /home/Colégio/Informática/OpenERP/openerp/web/openerp/tools/expose.py in func_wrapper(*args=('/',), **kw={'action': None, 'db': None, 'message': None, 'origArgs': {}, 'user': None})
  244                                 jset.add(script)
  245 
  246                     return render_template(_template, res).encode("utf-8")
  247                 
  248             if not isinstance(res, basestring):
global render_template = <function render_template at 0x8928294>, _template = <mako.template.Template object at 0x8b6ec6c>, res = {'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...}, ).encode undefined
 /home/Colégio/Informática/OpenERP/openerp/web/openerp/tools/expose.py in render_template(template=<mako.template.Template object at 0x8b6ec6c>, kw={'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...})
  191         kw['ctx'] = kw.pop('context')
  192         
  193     return utils.NoEscape(template.render_unicode(**kw))
  194 
  195 
global utils = <module 'openerp.tools.utils' from '/home/Colég...ica/OpenERP/openerp/web/openerp/tools/utils.pyc'>, utils.NoEscape = <class 'openerp.tools.utils.NoEscape'>, template = <mako.template.Template object at 0x8b6ec6c>, template.render_unicode = <bound method Template.render_unicode of <mako.template.Template object at 0x8b6ec6c>>, kw = {'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...}
 /usr/lib/python2.6/site-packages/mako/template.py in render_unicode(self=<mako.template.Template object at 0x8b6ec6c>, *args=(), **data={'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...})
  196                                 args, 
  197                                 data, 
  198                                 as_unicode=True)
  199         
  200     def render_context(self, context, *args, **kwargs):
as_unicode undefined, builtin True = True
 /usr/lib/python2.6/site-packages/mako/runtime.py in _render(template=<mako.template.Template object at 0x8b6ec6c>, callable_=<function render_body at 0x8bc1e64>, args=(), data={'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...}, as_unicode=True)
  401     context._with_template = template
  402     
  403     _render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
  404     return context._pop_buffer().getvalue()
  405 
global _render_context = <function _render_context at 0x88ae95c>, template = <mako.template.Template object at 0x8b6ec6c>, callable_ = <function render_body at 0x8bc1e64>, context = <mako.runtime.Context object at 0x8f619ac>, args = (), global _kwargs_for_callable = <function _kwargs_for_callable at 0x88ae8ec>, data = {'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...}
 /usr/lib/python2.6/site-packages/mako/runtime.py in _render_context(tmpl=<mako.template.Template object at 0x8b6ec6c>, callable_=<function render_body at 0x8bc1e64>, context=<mako.runtime.Context object at 0x8f619ac>, *args=(), **kwargs={'action': None, 'cp': {'request': <cherrypy._ThreadLocalProxy object a...enerp.controllers.root.Root object at 0x8f31ccc>}, 'db': None, 'dblist': [u'teste'], 'info': '', 'message': None, 'origArgs': {}, 'password': None, 'py': {'disabled': <function <lambda> at 0x8f605a4>, '...c>, 'selector': <function <lambda> at 0x8f60534>}, 'rpc': <module 'openerp.rpc' from '/home/Colégio/Informática/OpenERP/openerp/web/openerp/rpc.pyc'>, ...})
  431     if not isinstance(tmpl, template.DefTemplate):
  432         # if main render method, call from the base of the inheritance stack
  433         (inherit, lclcontext) = _populate_self_namespace(context, tmpl)
  434         _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  435     else:
inherit undefined, lclcontext undefined, global _populate_self_namespace = <function _populate_self_namespace at 0x88ae87c>, context = <mako.runtime.Context object at 0x8f619ac>, tmpl = <mako.template.Template object at 0x8b6ec6c>
 /usr/lib/python2.6/site-packages/mako/runtime.py in _populate_self_namespace(context=<mako.runtime.Context object at 0x8f619ac>, template=<mako.template.Template object at 0x8b6ec6c>, self_ns=<mako.runtime.Namespace object at 0x8f619cc>)
  380     context._data['self'] = context._data['local'] = self_ns
  381     if hasattr(template.module, '_mako_inherit'):
  382         ret = template.module._mako_inherit(template, context)
  383         if ret:
  384             return ret
ret undefined, template = <mako.template.Template object at 0x8b6ec6c>, template.module = <module '_controllers_templates_login_mako' (built-in)>, template.module._mako_inherit = <function _mako_inherit at 0x8bc1e2c>, context = <mako.runtime.Context object at 0x8f619ac>
 /home/Colégio/Informática/OpenERP/openerp/web/_controllers_templates_login_mako in _mako_inherit(template=<mako.template.Template object at 0x8b6ec6c>, context=<mako.runtime.Context object at 0x8f619ac>)
 /usr/lib/python2.6/site-packages/mako/runtime.py in _inherit_from(context=<mako.runtime.Context object at 0x8f619ac>, uri=u'master.mako', calling_uri='/controllers/templates/login.mako')
  346     if uri is None:
  347         return None
  348     template = _lookup_template(context, uri, calling_uri)
  349     self_ns = context['self']
  350     ih = self_ns
template undefined, global _lookup_template = <function _lookup_template at 0x88ae844>, context = <mako.runtime.Context object at 0x8f619ac>, uri = u'master.mako', calling_uri = '/controllers/templates/login.mako'
 /usr/lib/python2.6/site-packages/mako/runtime.py in _lookup_template(context=<mako.runtime.Context object at 0x8f619ac>, uri=u'/controllers/templates/master.mako', relativeto='/controllers/templates/login.mako')
  371     uri = lookup.adjust_uri(uri, relativeto)
  372     try:
  373         return lookup.get_template(uri)
  374     except exceptions.TopLevelLookupException, e:
  375         raise exceptions.TemplateLookupException(str(e))
lookup = <openerp.tools.expose.TL object at 0x88b89ac>, lookup.get_template = <bound method TL.get_template of <openerp.tools.expose.TL object at 0x88b89ac>>, uri = u'/controllers/templates/master.mako'
 /home/Colégio/Informática/OpenERP/openerp/web/openerp/tools/expose.py in get_template(self=<openerp.tools.expose.TL object at 0x88b89ac>, uri=u'/controllers/templates/master.mako')
   81         except Exception, e:
   82             pass
   83         self.cache[str(uri)] = res = super(TL, self).get_template(uri)
   84         return res
   85     
self = <openerp.tools.expose.TL object at 0x88b89ac>, self.cache = {'/controllers/templates/about.mako': <mako.template.Template object at 0x8f563cc>, '/controllers/templates/calpopup.mako': <mako.template.Template object at 0x8b6906c>, '/controllers/templates/database.mako': <mako.template.Template object at 0x8c2820c>, '/controllers/templates/error_page.mako': <mako.template.Template object at 0x8f310ac>, '/controllers/templates/exp.mako': <mako.template.Template object at 0x8be9fac>, '/controllers/templates/fieldpref.mako': <mako.template.Template object at 0x8d53dec>, '/controllers/templates/form.mako': <mako.template.Template object at 0x8b6ec0c>, '/controllers/templates/image.mako': <mako.template.Template object at 0x8c2d44c>, '/controllers/templates/imp.mako': <mako.template.Template object at 0x8c3542c>, '/controllers/templates/login.mako': <mako.template.Template object at 0x8b6ec6c>, ...}, builtin str = <type 'str'>, uri = u'/controllers/templates/master.mako', global res = '/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp/controllers/templates/openm2m.mako', builtin super = <type 'super'>, global TL = <class 'openerp.tools.expose.TL'>, ).get_template = <bound method TL.get_template of <openerp.tools.expose.TL object at 0x88b89ac>>
 /usr/lib/python2.6/site-packages/mako/lookup.py in get_template(self=<openerp.tools.expose.TL object at 0x88b89ac>, uri=u'/controllers/templates/master.mako')
  107             u = re.sub(r'^\/+', '', uri)
  108             for dir in self.directories:
  109                 srcfile = posixpath.normpath(posixpath.join(dir, u))
  110                 if os.path.isfile(srcfile):
  111                     return self._load(srcfile, uri)
srcfile undefined, global posixpath = <module 'posixpath' from '/usr/lib/python2.6/posixpath.pyc'>, posixpath.normpath = <function normpath at 0x82b995c>, posixpath.join = <function join at 0x82b4bc4>, dir = '/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp', u = u'controllers/templates/master.mako'
 /usr/lib/python2.6/posixpath.py in join(a='/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp', *p=(u'controllers/templates/master.mako',))
   68             path +=  b
   69         else:
   70             path += '/' + b
   71     return path
   72 
path = '/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp', b = u'controllers/templates/master.mako'

<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)
      args = ('ascii', '/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp', 9, 10, 'ordinal not in range(128)')
      encoding = 'ascii'
      end = 10
      message = ''
      object = '/home/Col\xc3\xa9gio/Inform\xc3\xa1tica/OpenERP/openerp/web/openerp'
      reason = 'ordinal not in range(128)'
      start = 9





References