client-web crashes on startup

Bug #691962 reported by Peter Glock
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
High
OpenERP R&D Web Team

Bug Description

Platform OSX 10.6.5, python 2.7.1, Firefox and Safari browsers.
6.0-dev from 18 December [revision 3066] crashes on startup with following message:
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/CherryPy-3.1.2-py2.7.egg/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/CherryPy-3.1.2-py2.7.egg/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/tools/_expose.py", line 191, in func_wrapper
    res = func(*args, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/controllers/_root.py", line 63, in default
    obj = pooler.get_pool().get_controller("/openerp/modules")
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/pooler.py", line 93, in get_pool
    addons.load_addons(db_name, config)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/addons.py", line 206, in load_addons
    load_module_graph(db_name, graph, config)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/addons.py", line 183, in load_module_graph
    i18n.load_translations(addon_path)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/i18n/_gettext.py", line 91, in load_translations
    _load_translations(path, locales, domain)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/i18n/_gettext.py", line 72, in _load_translations
    tr = _load_translation(path, locale, domain)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/openerp_web-6.0.0_rc1-py2.7.egg/openobject/i18n/_gettext.py", line 62, in _load_translation
    locale_path, [locale], domain)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Babel-0.9.5-py2.7.egg/babel/support.py", line 309, in load
    return cls(fileobj=open(filename, 'rb'), domain=domain)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Babel-0.9.5-py2.7.egg/babel/support.py", line 283, in __init__
    gettext.GNUTranslations.__init__(self, fp=fileobj)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py", line 180, in __init__
    self._parse(fp)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py", line 315, in _parse
    self.plural = c2py(plural)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py", line 126, in c2py
    return eval('lambda n: int(%s)' % plural)
  File "<string>", line 1
    lambda n: int((test(n%10==1 and n%100!=11 , 0 , test( n%10>=2 and n%10< =4 and (n%100<10 or n%100>=20) , 1 , 2))))

Revision history for this message
Denis Konchekov (dkonchekov) wrote :

Error in Babel package (version 0.9.5). I change 'n%10< =4' to 'n%10<=4' in /usr/local/lib/python2.6/dist-packages/Babel-0.9.5-py2.6.egg/babel/messages/plurals.py file (line 180). In trunk version of package this error fixed.

Revision history for this message
Denis Konchekov (dkonchekov) wrote :

But why web client uses this package now? It added problems to everyone who don't use trunk versions of all python packages.

Revision history for this message
Peter Glock (peter-glock) wrote :

just to confirm, fixing the simple typo in plurals.py allows the web client to start.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Unable to start web-client after latest update revision 4137.

Changed in openobject-client-web:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → OpenERP SA's Web Client R&D (openerp-dev-web)
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> But why web client uses this package now?

The web client has been using babel for months if not years, the issue arose because serbian translation files were generated (and parsed), and the bug is specifically in the serbian pluralization support. Since translations in the web client didn't work until last week, this issue went under the radar until I "fixed" it.

Changed in openobject-client-web:
status: Confirmed → Fix Released
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Should be fixed, users of serbian translations will have to either roll back Babel to 0.9.4 or use the Trunk version, but apart from that things should now work correctly for the other locales.

Navrang Oza (noz-tiny)
Changed in openobject-client-web:
milestone: none → 6.0-rc2
Revision history for this message
Peter Glock (peter-glock) wrote :

Fixed for me. Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.