Skip to Content
Menu
This question has been flagged
2 Replies
2166 Views

I have been following the guide for creating the custom open academy module, but am having problems trying to install the module. I have managed to get it to show up in the list of modules, but when I try to install it I get the error below.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 499, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 516, in dispatch
    result = self._call_function(**self.params)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 282, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 279, in checked_call
    return self.endpoint(*a, **kw)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 732, in __call__
    return self.method(*args, **kw)
  File "/usr/local/lib/python2.7/site-packages/openerp/http.py", line 375, in response_wrap
    response = f(*args, **kw)
  File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 948, in call_button
    action = self._call_kw(model, method, args, {})
  File "/var/packages/Odoo8/target/addons/web/controllers/main.py", line 936, in _call_kw
    return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/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 "/usr/local/lib/python2.7/site-packages/openerp/api.py", line 237, in wrapper
    return old_api(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/openerp/addons/base/module/module.py", line 497, in _button_immediate_function
    registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/registry.py", line 324, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 358, in load_modules
    loaded_modules, update_module)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 263, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/loading.py", line 149, in load_module_graph
    load_openerp_module(package.name)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/module.py", line 312, in load_openerp_module
    __import__('openerp.addons.' + module_name)
  File "/usr/local/lib/python2.7/site-packages/openerp/modules/module.py", line 76, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
ImportError: No module named openacademy
Avatar
Discard
Author Best Answer

I was able to fix the problem it turns out my __init__.py file was missing an _!

Avatar
Discard
Best Answer

Hi Josh,

Without the code it is tough to tell. My suspicion would be that you may be trying something like:

from openacademy import ... instead of from openerp import ...?


Avatar
Discard
Related Posts Replies Views Activity
1
Apr 21
4591
4
Oct 20
6597
2
Apr 15
3539
3
Jan 24
11023
1
Mar 15
2966