Guessing from the fact that this occurs only sometimes, perhaps this
is a load/scaling issue with mod_python? It's happening in my
production system where I do get a lot of hits.
Any input/advice would be much appreciated.
Cheers,
Nihaar
MOD_PYTHON ERROR
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
line 1229, in _process_target
result = _execute_target(config, req, object, arg)
File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
line 1128, in _execute_target
result = object(arg)
File "/usr/lib/python2.6/site-packages/django/core/handlers/
modpython.py", line 228, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.6/site-packages/django/core/handlers/
modpython.py", line 205, in __call__
response = middleware_method(request, response)
File "/usr/lib/python2.6/site-packages/django/middleware/common.py",
line 83, in process_response
if response.status_code == 404:
AttributeError: 'str' object has no attribute 'status_code'
Obviously a string is returned instead of a response object. Does it
always happen on the same view, or is it a random error ?
Anyway : the best way to trace the problem would be to add a couple
lines of code around line 83 to catch the exception and log the
offending string *and* the whole traceback.
My 2 cents...