Django

Code

Ticket #4673 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

Svn revision 5515 seems to be faulty: mod_name is not defined

Reported by: hans.rauch@gmx.net Assigned to: adrian
Milestone: Component: Core framework
Version: SVN Keywords: mod_name
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by mtredinnick)

If I update my django-trunk to revision 5515, I get the following error:

[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython: Traceback (most recent call last):
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/lib64/python2.5/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py", line 177, in handler\n    return ModPythonHandler()(req)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py", line 150, in __call__\n    response = self.get_response(request)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/base.py", line 66, in get_response\n    resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py", line 188, in __init__\n    self.reverse_dict[pattern.callback] = (pattern,)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py", line 154, in _get_callback\n    raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython: NameError: global name 'mod_name' is not defined
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython: Traceback (most recent call last):
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/lib64/python2.5/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py", line 177, in handler\n    return ModPythonHandler()(req)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/modpython.py", line 150, in __call__\n    response = self.get_response(request)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/handlers/base.py", line 66, in get_response\n    resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py", line 188, in __init__\n    self.reverse_dict[pattern.callback] = (pattern,)
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython:   File "/usr/local/lib64/python2.5/site-packages/django/core/urlresolvers.py", line 154, in _get_callback\n    raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))
[Sun Jun 24 10:34:57 2007] [error] [client 192.168.0.222] PythonHandler django.core.handlers.modpython: NameError: global name 'mod_name' is not defined

Attachments

Change History

06/24/07 03:45:41 changed by hans.rauch@gmx.net

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

I'm sorry! The error appears with svn revision 5516!!! Revision 5515 is ok.

06/24/07 03:52:02 changed by mtredinnick

  • description changed.
  • stage changed from Unreviewed to Accepted.

Fixed description. Working on a fix for the bug now.

06/24/07 04:38:35 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5520]) Fixed #4673 -- Fixed error reporting bug from [5516]. Also changed the timing for populating the reverse cache, since that may have been happening too early.

06/24/07 04:40:16 changed by mtredinnick

I was a bit worried about why you were seeing that error in the first place on an otherwise working setup, so I've changed the ordering of the code execution a little bit in [5520] as well. If you still get an error or things are misbehaving, please do report it (and include an example urls.py that is causing the problem).

06/24/07 08:08:41 changed by hans.rauch@gmx.net

Thank you, revision 5526 is working well again!


Add/Change #4673 (Svn revision 5515 seems to be faulty: mod_name is not defined)




Change Properties
Action