Opened 9 years ago

Closed 9 years ago

#5004 closed (duplicate)

Keyword Devel collision

Reported by: petek@… Owned by: jacob
Component: Uncategorized Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by mtredinnick)

Setting up mod_python, when I put in PythonPath="['/usr/local/django/devel'].sys.path" , I get :

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/", line 299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/", line 177, in handler
    return ModPythonHandler()(req)

  File "/usr/lib/python2.4/site-packages/django/core/handlers/", line 145, in __call__

  File "/usr/lib/python2.4/site-packages/django/core/handlers/", line 22, in load_middleware
    for middleware_path in settings.MIDDLEWARE_CLASSES:

  File "/usr/lib/python2.4/site-packages/django/conf/", line 28, in __getattr__

  File "/usr/lib/python2.4/site-packages/django/conf/", line 55, in _import_settings
    self._target = Settings(settings_module)

  File "/usr/lib/python2.4/site-packages/django/conf/", 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 'settings' (Is it on sys.path? Does it have syntax errors?): No module named settings

However....with ['/usr/local/django/']+sys.path it works fine......

Change History (3)

comment:1 Changed 9 years ago by mtredinnick

  • Description modified (diff)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

There is no bug here. The first thing you tried is not valid Python syntax and the second version is. The documentation uses an example very similar to the second version, too.

comment:2 Changed 9 years ago by petek@…

  • Resolution invalid deleted
  • Status changed from closed to reopened

Sorry, reopening. My mistake on the first syntax. Copied incorrectly.

"usr/local/django/devel?+sys.path" (no good)


"usr/local/django/?+sys.path" (ok)

comment:3 Changed 9 years ago by Simon G. <dev@…>

  • Resolution set to duplicate
  • Status changed from reopened to closed

dupe of #4296.

Note: See TracTickets for help on using tickets.
Back to Top