upgrade to 0.9.2 Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?

Asked by Nathanael Anderson

I just upgraded to 9.2, and am wondering if some system settings changed.

to upgrade i removed my /usr/local/graphite directory and did a fresh install and restored my storage policies, and recreated the default database entries.

I'm guessing a path changed, and I don't know where to look for the change.

==> webapp-error.log <==
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] mod_python (pid=6341, interpreter='graphite', phase='PythonHandler', handler='django.core.handlers.modpython'): Application error
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] ServerName: 'graphite'
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] DocumentRoot: '/usr/local/graphite/'
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] URI: '/'
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] Location: '/'
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] Directory: None
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] Filename: '/usr/local/graphite/'
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] PathInfo: ''
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] Traceback (most recent call last):
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=default_handler, arg=req, silent=hlist.silent)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target\n result = _execute_target(config, req, object, arg)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result = object(arg)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", line 177, in handler\n return ModPythonHandler()(req)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", line 145, in __call__\n self.load_middleware()
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 22, in load_middleware\n for middleware_path in settings.MIDDLEWARE_CLASSES:
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 28, in __getattr__\n self._import_settings()
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 55, in _import_settings\n self._target = Settings(settings_module)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 83, in __init__\n raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)
[Fri Jul 04 13:51:36 2008] [error] [client 192.168.129.13] EnvironmentError: Could not import settings 'web.settings' (Is it on sys.path? Does it have syntax errors?): No module named web.settings

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
chrismd (chrismd) said :
#1

Yes there was a change in the directory structure and I'm guessing you kept your previous apache config in place. The webapp code used to be in /usr/local/graphite/web/ but is now in /usr/local/graphite/webapp/web/. The new path may sound redundant but it allows me to cleanly isolate static content used by the webapp from other graphite components that are not related to the webapp. You can either use the graphite-vhost.conf created by the 0.9.2 installer, or just update your existing vhost config to have the DocumentRoot change from /usr/local/graphite/ to /usr/local/graphite/webapp/ (which is the only difference in the file created by the 0.9.2 installer).

Revision history for this message
Jeff Blaine (jblaine-kickflop) said :
#2

Ancient and solved, so marking solved.