← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1530338] [NEW] ImportError: No module named enabled

 

Public bug reported:

When deploying horizon using devstack I realised that  one python module
that is actually provided and listed in git repo, it is also marked to
be ignored in .gitignored file.

    $ git ls-files openstack_dashboard/local/enabled/
    openstack_dashboard/local/enabled/_50_settings.py.example
    openstack_dashboard/local/enabled/__init__.py


openstack_dashboard.local.enabled is imported as in shown below log and therefore its __init__.py file should not be ignored as here:

https://github.com/openstack/horizon/commit/28e14b71418bd73d67aee190a1106ec49c4b558e

Log file of the failure I got:

2015-12-31 13:00:16.041 | Traceback (most recent call last):
2015-12-31 13:00:16.042 |   File "/opt/stack/horizon/manage.py", line 23, in <module>
2015-12-31 13:00:16.042 |     execute_from_command_line(sys.argv)
2015-12-31 13:00:16.043 |   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
2015-12-31 13:00:16.043 |     utility.execute()
2015-12-31 13:00:16.043 |   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 303, in execute
2015-12-31 13:00:16.044 |     settings.INSTALLED_APPS
2015-12-31 13:00:16.044 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
2015-12-31 13:00:16.045 |     self._setup(name)
2015-12-31 13:00:16.045 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
2015-12-31 13:00:16.046 |     self._wrapped = Settings(settings_module)
2015-12-31 13:00:16.046 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
2015-12-31 13:00:16.046 |     mod = importlib.import_module(self.SETTINGS_MODULE)
2015-12-31 13:00:16.047 |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
2015-12-31 13:00:16.047 |     __import__(name)
2015-12-31 13:00:16.048 |   File "/opt/stack/horizon/openstack_dashboard/settings.py", line 346, in <module>
2015-12-31 13:00:16.048 |     import openstack_dashboard.local.enabled
2015-12-31 13:00:16.049 | ImportError: No module named enabled

** Affects: horizon
     Importance: Undecided
     Assignee: Federico Ressi (federico-ressi-9)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1530338

Title:
  ImportError: No module named enabled

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  When deploying horizon using devstack I realised that  one python
  module that is actually provided and listed in git repo, it is also
  marked to be ignored in .gitignored file.

      $ git ls-files openstack_dashboard/local/enabled/
      openstack_dashboard/local/enabled/_50_settings.py.example
      openstack_dashboard/local/enabled/__init__.py

  
  openstack_dashboard.local.enabled is imported as in shown below log and therefore its __init__.py file should not be ignored as here:

  https://github.com/openstack/horizon/commit/28e14b71418bd73d67aee190a1106ec49c4b558e

  Log file of the failure I got:

  2015-12-31 13:00:16.041 | Traceback (most recent call last):
  2015-12-31 13:00:16.042 |   File "/opt/stack/horizon/manage.py", line 23, in <module>
  2015-12-31 13:00:16.042 |     execute_from_command_line(sys.argv)
  2015-12-31 13:00:16.043 |   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
  2015-12-31 13:00:16.043 |     utility.execute()
  2015-12-31 13:00:16.043 |   File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 303, in execute
  2015-12-31 13:00:16.044 |     settings.INSTALLED_APPS
  2015-12-31 13:00:16.044 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in __getattr__
  2015-12-31 13:00:16.045 |     self._setup(name)
  2015-12-31 13:00:16.045 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in _setup
  2015-12-31 13:00:16.046 |     self._wrapped = Settings(settings_module)
  2015-12-31 13:00:16.046 |   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in __init__
  2015-12-31 13:00:16.046 |     mod = importlib.import_module(self.SETTINGS_MODULE)
  2015-12-31 13:00:16.047 |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
  2015-12-31 13:00:16.047 |     __import__(name)
  2015-12-31 13:00:16.048 |   File "/opt/stack/horizon/openstack_dashboard/settings.py", line 346, in <module>
  2015-12-31 13:00:16.048 |     import openstack_dashboard.local.enabled
  2015-12-31 13:00:16.049 | ImportError: No module named enabled

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1530338/+subscriptions


Follow ups