6.1RC1 on Centos 6.2 - Python error in openerp/addons/base/ir/ir_model.py

Asked by VK Sameer

This error crops up when trying to run out of the 6.1 RC1 tarball on CentOS 6.2 with Python 2.6:

...
[2012-01-24 12:45:29,786][?] INFO:web.common.http:Loading base
python: Python/compile.c:3437: stackdepth_walk: Assertion `depth >= 0' failed.
Aborted

More details here: http://www.openerp.com/forum/post99396.html
and change to _get_fields_type() to stop the error here: http://www.openerp.com/forum/post99425.html

How do I fix the problem correctly?

Please let me know if more details are needed.

Regards,
Sameer

Question information

Language:
English Edit question
Status:
Solved
For:
OpenERP Edit question
Assignee:
No assignee Edit question
Solved by:
Florent
Solved:
Last query:
Last reply:
Revision history for this message
VK Sameer (vksameer) said :
#1

With this fix, login fails and these errors show up:

OpenERP Server Error

Client Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/common/http.py", line 176, in dispatch
    response["result"] = method(controller, self, **self.params)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/controllers/main.py", line 392, in authenticate
    req.session.authenticate(db, login, password, env)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/common/session.py", line 71, in authenticate
    uid = self.proxy('common').authenticate(db, login, password, env)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/common/openerplib/main.py", line 117, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/common/http.py", line 579, in send
    raise fault

Server Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/web/common/http.py", line 560, in send
    result = openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/netsvc.py", line 325, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/service/web_services.py", line 387, in dispatch
    return fn(*params)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/service/web_services.py", line 398, in exp_authenticate
    res_users = pooler.get_pool(db).get('res.users')
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/pooler.py", line 50, in get_pool
    return get_db_and_pool(db_name, force_demo, status, update_module)[1]
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/modules/registry.py", line 138, in get
    update_module, pooljobs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/modules/registry.py", line 160, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/modules/loading.py", line 299, in load_modules
    loaded_modules, processed_modules = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/modules/loading.py", line 180, in load_module_graph
    modobj.check(cr, 1, [module_id])
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/addons/base/module/module.py", line 601, in check
    if not mod.description:
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/osv/orm.py", line 476, in __getattr__
    return self[name]
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/osv/orm.py", line 389, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/osv/orm.py", line 3372, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/osv/orm.py", line 3431, in _read_flat
    cr.execute(query, (tuple(sub_ids),))
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/sql_db.py", line 153, in wrapper
    return f(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-6.1rc1_20120112_173907-py2.6.egg/openerp/sql_db.py", line 215, in execute
    res = self._obj.execute(query, params)
ProgrammingError: column ir_module_module.sequence does not exist
LINE 1: ...ule."description",ir_module_module."contributors",ir_module_...

Revision history for this message
Best Florent (florent.x) said :
#2

This is a problem with your version of python.
This should give you the same crash:

python2.6 -c "[1 for x in () if 1 if 1 if 1 if 1]"

Actually, I can reproduce this with Python 2.5.4 on OSX.
However Python 2.6.1 and newer don't give the error, here.

Then I tried Python 2.4, 2.5 and 2.6 on Debian: no such error.

Revision history for this message
VK Sameer (vksameer) said :
#3

Thanks Florent, that solved my question.

Revision history for this message
VK Sameer (vksameer) said :
#4

Please ignore comment #2. That seems to be a problem from a change in database table columns. I _was_ able to login after that was fixed.

Finally going to Python 2.6.7 and/or 2.7.2, built from tarballs. Difficult to locate, download, and install Python SRPM on CentOS, and as far as I could figure out, the build flags compared to a stock configure have enable-shared and disable-rpath (or something similar).

Sincere thanks for Florent for diagnosing the issue so well. I would have probably spent hours or days trying different variations of dependency installs!

Revision history for this message
Marc Rechté (marc3) said :
#5

Intalling the rpm in (from http://nightly.openerp.com/6.1/releases/openerp-6.1-1.tar.gz dated 23/2/2012) produces that same error on RedHat 6.2, Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:02).

I submitted bug [Bug 940084] [NEW] Install / RedHat 6.2 / pip fails with InstallationError.

When is at last OpenErp going to work on RedHat ?

Revision history for this message
Pablo Baenas (pbaenas) said :
#6

any solution?

Revision history for this message
Pablo Baenas (pbaenas) said :
#7

Python 2.6.7 fix this issue

Revision history for this message
Martin Sarabia (msarabia78) said :
#8

install phyton x86_x64 version 2.6.6-52. This fix the error "python: Python/compile.c:3437: stackdepth_walk: Assertion `depth >= 0' failed."

to verify try execute
   python -c "[1 for x in () if 1 if 1 if 1 if 1]"

yum install python.x86_x64