Ask Your Question
0

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

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

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

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/

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/base.py" in get_response 101. request.path_info) File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/urlresolvers.py" 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/urlresolvers.py" in resolve 158. return ResolverMatch(self.callback, args, kwargs, self.name) File "/root/src/openstack-dashboard/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/django/core/urlresolvers.py" 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
0

answered 2011-07-07 05:07:09 -0500

It seems that tools/install_venv.py 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/install_venv.py 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

Stats

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

Seen: 87 times

Last updated: Jul 07 '11