Comment 1 for bug 175239

Revision history for this message
Carl Karsten (carlfk) wrote :

bug vanished for no reason.

I think all I did was create/remove the file:

sudo touch /usr/share/doc/python-django/examples/__init__.py
sudo rm /usr/share/doc/python-django/examples/__init__.pyc

but now when I hit with browser, I get an error page and no segfault.

MOD_PYTHON ERROR

ProcessId: 4059
Interpreter: 'cp333.personnelware.com'

ServerName: 'cp333.personnelware.com'
DocumentRoot: '/htdocs'

URI: '/'
Location: '/'
Directory: None
Filename: '/htdocs'
PathInfo: '/'

Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'

Traceback (most recent call last):

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
    default=default_handler, arg=req, silent=hlist.silent)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1229, in _process_target
    result = _execute_target(config, req, object, arg)

  File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1128, in _execute_target
    result = object(arg)

  File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", line 177, in handler
    return ModPythonHandler()(req)

  File "/var/lib/python-support/python2.5/django/core/handlers/modpython.py", line 145, in __call__
    self.load_middleware()

  File "/var/lib/python-support/python2.5/django/core/handlers/base.py", line 22, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 28, in __getattr__
    self._import_settings()

  File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 55, in _import_settings
    self._target = Settings(settings_module)

  File "/var/lib/python-support/python2.5/django/conf/__init__.py", line 83, in __init__
    raise EnvironmentError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)

EnvironmentError: Could not import settings 'examples.settings' (Is it on sys.path? Does it have syntax errors?): No module named examples.settings