Ask Your Question

Could not import dashboard.views. Error was: No module named routes

asked 2011-07-06 14:44:47 -0600

I did as the README on github suggested and now the app is doing:


Request Method: GET Request URL:

Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['dashboard', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.comments', 'django.contrib.sites', 'django.contrib.markup', 'django.contrib.syndication', 'django_nose', 'django_openstack', 'django_openstack.templatetags', 'mailer'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django_openstack.middleware.keystone.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'dashboard.middleware.DashboardLogUnhandledExceptionsMiddleware')

Traceback: File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/handlers/" in get_response 101. request.path_info) File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/" in resolve 252. sub_match = pattern.resolve(new_path) File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/" in resolve 158. return ResolverMatch(self.callback, args, kwargs, File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/" in _get_callback 167. raise ViewDoesNotExist("Could not import %s. Error was: %s" % (mod_name, str(e)))

Exception Type: ViewDoesNotExist at / Exception Value: Could not import dashboard.views. Error was: No module named routes

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2011-07-07 05:07:09 -0600

It seems that tools/ creates the virtualenv with the --no-site-packages option That is used to prevent the wrong versions of some modules from polluting the virtualenv python - but means that all dependencies need to be added to that virtualenv

The easiest fix is to remove that flag from tools/ where the virtualenv is being created.

At least it seems to have worked for me...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2011-07-06 14:44:47 -0600

Seen: 77 times

Last updated: Jul 07 '11