当我将OpenERP插件迁移到centos 6.5时,我遇到了问题, 以前,插件在Ubuntu 12.04和Debian 7中运行良好 但是现在我有这样的错误:
2014-03-06 03:28:35,223 21557 ERROR bac-erp openerp.tools.safe_eval: Cannot eval '#\r\n{\r\n \'name\' : \'Project Task Detail\',\r\n \'category\' : \'Project Task Detail\',\r\n \'version\' : \'1.0\',\r\n \'depends\' : ["base","project"],\r\n \'author\' : \'Cahyo Bagus L\',\r\n \'description\' : \'\'\'Project Task Detail\'\'\',\r\n \'init_xml\' : [],\r\n \'update_xml\' : [\'bac_project_task_detail_view.xml\'],\r\n \'installable\' : True,\r\n \'active\' : False,\r\n}\r\n'
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20140226_002804-py2.6.egg/openerp/tools/safe_eval.py", line 241, 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_20140226_002804-py2.6.egg/openerp/tools/safe_eval.py", line 107, in test_expr
code_obj = compile(expr, "", mode)
File "<string>", line 2
{
^
SyntaxError: invalid syntax
2014-03-06 03:28:35,224 21557 ERROR bac-erp openerp.netsvc: invalid syntax
('', 2, 2, '{\r\n')
2014-03-06 02:14:20,121 21145 ERROR bac-erp openerp.netsvc: invalid syntax
('', 2, 1, '\r\n')
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/openerp-7.0_20140226_002804-py2.6.egg/openerp/netsvc.py", line 292, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20140226_002804-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_20140226_002804-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_20140226_002804-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_20140226_002804-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_20140226_002804-py2.6.egg/openerp/modules/registry.py", line 203, in get
update_module)
File "/usr/lib/python2.6/site-packages/openerp-7.0_20140226_002804-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_20140226_002804-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_20140226_002804-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_20140226_002804-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_20140226_002804-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_20140226_002804-py2.6.egg/openerp/tools/safe_eval.py", line 241, 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_20140226_002804-py2.6.egg/openerp/tools/safe_eval.py", line 107, in test_expr
code_obj = compile(expr, "", mode)
File "<string>", line 2
^
SyntaxError: invalid syntax
这是我服务器的详细规范。 Python 2.6 Centos 6.5 openerp-7最新形式每晚构建。 此错误仅发生在我制作的自定义插件上,而不是像hr,sale,purchase这样的openerp中包含的插件。 这是我的插件。
#__openerp__.py
{
'name' : 'Project Task Detail',
'category' : 'Project Task Detail',
'version' : '1.0',
'depends' : ["base","project"],
'author' : 'Author Name',
'description' : '''Project Task Detail''',
'init_xml' : [],
'update_xml' : ['bac_project_task_detail_view.xml'],
'installable' : True,
'active' : False,
}
你知道为什么会这样吗?我可以采取什么解决方案来解决问题?请指教。 谢谢你。