Odoo Help


Openerp problem after migration

on 10/7/14, 9:46 AM 1,803 views


We are migrating an openerp server 7 from ubuntu 12.04 LTS ( running python 2.7) to centos 6.5 ( running python 2.6).

We have succesfully migrated the database, but after migrating /addons folder we get this error :

Client Traceback (most recent call last): File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/http.py", line 204, in dispatch response["result"] = method(self, **self.params) File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/controllers/main.py", line 864, in authenticate req.session.authenticate(db, login, password, env) File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/session.py", line 115, in authenticate uid = self.proxy('common').authenticate(db, login, password, env) File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/session.py", line 30, in proxy_method result = self.session.send(self.service_name, method, *args) File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/session.py", line 103, in send raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info) Server Traceback (most recent call last): File "/opt/openerp-7.0-20140409-231230/openerp/addons/web/session.py", line 89, in send return openerp.netsvc.dispatch_rpc(service_name, method, args) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/netsvc.py", line 296, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/service/web_services.py", line 433, in dispatch return fn(*params) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/service/web_services.py", line 444, in exp_authenticate res_users = pooler.get_pool(db).get('res.users') File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/pooler.py", line 49, in get_pool return get_db_and_pool(db_name, force_demo, status, update_module)[1] File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/pooler.py", line 33, in get_db_and_pool registry = RegistryManager.get(db_name, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/registry.py", line 203, in get update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/registry.py", line 233, in new openerp.modules.load_modules(registry.db, force_demo, status, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/loading.py", line 350, in load_modules force, status, report, loaded_modules, update_module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/loading.py", line 254, in load_marked_modules graph.add_modules(cr, module_list, force) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/graph.py", line 102, in add_modules info = openerp.modules.module.load_information_from_description_file(module) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/modules/module.py", line 344, in load_information_from_description_file info.update(eval(f.read())) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/tools/safe_eval.py", line 284, in safe_eval return eval(test_expr(expr, _SAFE_OPCODES, mode=mode), globals_dict, locals_dict) File "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/tools/safe_eval.py", line 157, in test_expr code_obj = compile(expr, "", mode) File "<string>", line 2 { ^ SyntaxError: invalid syntax ).

THank you.

On 10/8/14, 9:00 AM

Hi, no ideas please?

Robert D Winchester
On 10/8/14, 7:36 PM

Why are you "migrating" the addons folder?  If you just install Odoo on the new CentOS box that would install the addons folder too, right?

Hi, Yes, we have migrated addons folder, because we have a personalized addons installed in the old server, so we have to migrate addons

on 10/9/14, 5:57 AM

OK, then it is likely that this in related to your customized add-ons and no one here is going to be able to help you unless you give a lot more info on what they are. FYI, you can trace the source of the error at least as much as this: Your error is called out in the last line of the traceback: "/usr/lib/python2.6/site-packages/openerp-7.0_20140409_231230-py2.6.egg/openerp/tools/safe_eval.py", line 157, in test_expr code_obj = compile(expr, "", mode) File "", line 2 { ^ SyntaxError: invalid syntax ). Going to about line 157 of safe_eval.py we see this code: 154 def test_expr(expr, allowed_codes, mode="eval"): 155 """test_expr(expression, allowed_codes[, mode]) -> code_object 156 157 Test that the expression contains only the allowed opcodes. 158 If the expression is valid and contains only allowed codes, 159 return the compiled code object. 160 Otherwise raise a ValueError, a Syntax Error or TypeError accordingly. 161 """ 162 try: 163 if mode == 'eval': 164 # eval() does not like leading/trailing whitespace 165 expr = expr.strip() 166 code_obj = compile(expr, "", mode) 167 except (SyntaxError, TypeError, ValueError): 168 raise 169 except Exception, e: 170 import sys 171 exc_info = sys.exc_info() 172 raise ValueError, '"%s" while compiling\n%r' % (ustr(e), expr), exc_info[2] 173 assert_valid_codeobj(allowed_codes, code_obj, expr) 174 return code_obj So you are passing a string with a bad syntax. I don't know your custom code so I don't know what it could be. You need to go to the person who wrote the custom code and get them to check what runs through safe_eval.py to start.

Advantage Sports LLC, Robert D Winchester
on 10/9/14, 4:00 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/7/14, 9:46 AM
Seen: 1803 times
Last updated: 3/16/15, 8:10 AM