ImportError: No module named myplugin

asked 2016-08-17 12:20:53 -0500

dyutiman gravatar image

I was following Openstack plugin development tutorial ( ( to make a dummy plugin. I completed all the steps including installing my plugin

Processing /home/stack/myplugin/dist/myplugin-1.0.tar.gz
Installing collected packages: myplugin
  Running install for myplugin ... done
Successfully installed myplugin-1.0

I checked the .venv/lib/python2.7/site-packages/ folder and myplugin is there. Then I did ./ --runserver to start the server on 8877 port. When I went to the url, I am getting following error

You have offline compression enabled but key "f19ff7906361fa39856f41612174682f" is missing from offline manifest. You may need to run "python compress".

In the console when I tried python compress I got following error

stack@ubuntu:/opt/stack/horizon$ python compress
Traceback (most recent call last):
  File "", line 23, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 354, in execute_from_command_line
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 303, in execute
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 48, in __getattr__
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 92, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
  File "/opt/stack/horizon/openstack_dashboard/", line 378, in <module>
  File "/opt/stack/horizon/openstack_dashboard/utils/", line 122, in update_dashboards
    module = import_module(_app)
  File "/usr/lib/python2.7/importlib/", line 37, in import_module
ImportError: No module named myplugin

When I tried uninstalling my plugin with pip uninstall myplugin I got "Cannot uninstall requirement myplugin, not installed".

I installed openstack by devstack running on Ubuntu on virtual box.

Can anybody please guide me to find out what I have done wrong, or where I shall check for mistakes. I rechecked about the file names and folder structure. My looks like

# The name of the panel to be added to HORIZON_CONFIG. Required.
PANEL = 'mypanel'

# The name of the dashboard the PANEL associated with. Required.
PANEL_DASHBOARD = 'identity'

# Python panel class of the PANEL to be added.
ADD_PANEL = 'myplugin.content.mypanel.panel.MyPanel'

# A list of applications to be prepended to INSTALLED_APPS
ADD_INSTALLED_APPS = ['myplugin']

# A list of AngularJS modules to be loaded when Angular bootstraps.
ADD_ANGULAR_MODULES = ['horizon.dashboard.identity.myplugin.mypanel']

# Automatically discover static resources in installed apps

# A list of js files to be included in the compressed set of files

# A list of scss files to be included in the compressed set of files
ADD_SCSS_FILES = ['dashboard/identity/myplugin/myplugin.scss']

Thanks in advance.

edit retag flag offensive close merge delete