跳至内容
菜单
此问题已终结
2 回复
4491 查看

On running sudo /usr/bin/openerp-server restart from my ubuntu 12.10, i get Traceback (most recent call last): File "/usr/bin/openerp-server", line 5, in <module> openerp.cli.main() File "/usr/lib/pymodules/python2.7/openerp/cli/__init__.py", line 51, in main __import__(m) File "/usr/lib/pymodules/python2.7/openerp/modules/module.py", line 133, in load_module mod = imp.load_module('openerp.addons.' + module_part, f, path, descr) File "/usr/lib/pymodules/python2.7/openerp/addons/account_asset/__init__.py", line 22, in <module> import account_asset File "/usr/lib/pymodules/python2.7/openerp/addons/account_asset/account_asset.py", line 28, in <module> from tools.translate import _ ImportError: No module named tools.translate

I solve this by adding openerp.tools.translate on this particular module. Since there are so many modules with no explicit module declaration e.g with "from osv import fields, osv" declaration in many modules, how can i avoid having to add "openerp.xxx" in them so that openerp restarts smoothly?

形象
丢弃
最佳答案

Hi. May you have an "overconfiguration" problem. Can you try to make a clean system install, and after to make the module install. I was a same problem before when: - I modified the addons modules directly, not inherited way - I hacking the database directly, sometimes delete some records by direct way - Some other modules install randomly, just for fun like module version 5.0 but the system is 6.1

So may be you have some similar situation, but this is just my opinion. :-)

形象
丢弃
最佳答案

Hi, I have face this problem too. The easiest way to solve this problem is, take the latest update by applying command at your server location bzr pull & then revert the addons module by applying command bzr revert.I am sure this will solve your problem. Let me know if you still get error.

形象
丢弃

Hi Keyur, I am facing the same issue. What is the appropriate syntax? Many thanks.