This question has been flagged
2 Replies
8867 Views

Hello Odoo Community!

Does this error message sound familiar to you?

https://drive.google.com/open?id=1fCFplI_S4D0d4RvVJQsA0KjelsNAz-tWHIlaqdOeyG0

It is displayed when any user tries to install an application or module, and it reads as follows:


Odoo Server Error
Traceback (most recent call last):
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 530, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 567, in dispatch
result = self._call_function(**self.params)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 303, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/service/model.py", line 113, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 300, in checked_call
return self.endpoint(*a, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 796, in __call__
return self.method(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/http.py", line 396, in response_wrap
response = f(*args, **kw)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/web/controllers/main.py", line 940, in call_button
action = self._call_kw(model, method, args, {})
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/web/controllers/main.py", line 928, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/base/module/module.py", line 450, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/api.py", line 241, in wrapper
return old_api(self, *args, **kwargs)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/base/module/module.py", line 498, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/registry.py", line 368, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/loading.py", line 355, in load_modules
loaded_modules, update_module)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/loading.py", line 143, in load_module_graph
load_openerp_module(package.name)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/module.py", line 315, in load_openerp_module
__import__('openerp.addons.' + module_name)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/modules/module.py", line 80, in load_module
mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/base_contact/__init__.py", line 22, in <module>
import base_contact
File "/opt/bitnami/apps/odoo/lib/odoo-8.0_20150423-py2.7.egg/openerp/addons/base_contact/base_contact.py", line 22, in <module>
from osv import fields, osv
ImportError: No module named osv

Thanks in advanced!

Avatar
Discard
Best Answer

you need to change that import

from

from osv import fields, osv 

to

from openerp.osv import fields, osv 
Avatar
Discard
Best Answer

John seems to have a bitnami installation. I believe that something went wrong with the installation, because there is a module osv.py in the standard installation. Maybe a missing or wrong path configuration. It should not be necessary to change code like that. Also, a newer version of Odoo is available on Bitnami, I would try to install the newer one.

Avatar
Discard

That code works in v7, I still use it, but in new versions this are not posible, this one of the things that I do when migrating my modules from v7 to v9 alfa and I think that in v8 doesn't work that too

Axel, I do not deny your analysis. I only state that no Bitnami Odoo installation would work when your code change would be necessary and the whole Bitnami Odoo community would well know about it. But as this is not the case, the true cause must be in the installation or configuration process.

Last year I have made several Odoo Bitnami installations myself and I never had an issue like that.

The thing is that base_contact(taken from the logs you post) is a very old module (deprecated and no longer used in new versions) so if your bitnami installation is configured for use it that is the root cause of your troubles