ImportError: Could not import settings 'openstack_dashboard.settings': missing dependency on python-glanceclient

Bug #1034701 reported by liangxiaojiang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
High
Unassigned
Quantal
High
Unassigned

Bug Description

I install openstack folsom,but /var/log/apache2/error.log display:
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 184, in inner
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] self._setup()
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] self._wrapped = Settings(settings_module)
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 95, in __init__
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path?): No module named glanceclient.common
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] mod_wsgi (pid=20228): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] Traceback (most recent call last):
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] self.load_middleware()
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 39, in load_middleware
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] for middleware_path in settings.MIDDLEWARE_CLASSES:
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 184, in inner
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] self._setup()
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] self._wrapped = Settings(settings_module)
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 95, in __init__
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Thu Aug 09 09:32:49 2012] [error] [client 10.10.10.223] ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path?): No module named glanceclient.common
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] mod_wsgi (pid=20228): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] Traceback (most recent call last):
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 219, in __call__
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] self.load_middleware()
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 39, in load_middleware
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] for middleware_path in settings.MIDDLEWARE_CLASSES:
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line 184, in inner
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] self._setup()
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 42, in _setup
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] self._wrapped = Settings(settings_module)
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 95, in __init__
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Thu Aug 09 09:32:51 2012] [error] [client 10.10.10.223] ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path?): No module named glanceclient.common

anyone can help me?

Revision history for this message
James Page (james-page) wrote :

I see references to glanceclient in the horizon codebase:

(quantal-amd64)root@hendrix:/usr/share/pyshared# fgrep -r "glanceclient.common" *
horizon/tests/test_data/exceptions.py:from glanceclient.common import exceptions as glance_exceptions
horizon/exceptions.py:from glanceclient.common import exceptions as glanceclient
horizon/api/nova.py: from glanceclient.common import exceptions as glance_exceptions

Suspect its been missed during the re-jig between glance -> glanceclient.

Marking as High; please install python-glanceclient to workaround for the time being.

summary: - ImportError: Could not import settings 'openstack_dashboard.settings'
+ ImportError: Could not import settings 'openstack_dashboard.settings':
+ missing dependency on python-glanceclient
Changed in python-glanceclient (Ubuntu):
importance: Undecided → High
affects: python-glanceclient (Ubuntu) → horizon (Ubuntu)
Changed in horizon (Ubuntu):
status: New → Triaged
Revision history for this message
James Page (james-page) wrote :

Also reconfirmed on quantal...

sudo apt-get install openstack-dashboard

Then try to access it.

Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Looks like python-glanceclient was added as a Dependency with the horizon (2012.2~f3-0ubuntu1) upload, along with the other required clients (swiftclient, quantumclient, etc). Marking as Fixed Released since its missing the bug ref. If this is still an issue please reopen.

Changed in horizon (Ubuntu Quantal):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers