On Sun, Sep 19, 2010 at 3:08 AM, Yo-Yo Ma <baxterstock...@gmail.com> wrote:

> I got a printout of a stack trace on a white screen: I don't know how
> I can help you guys find the bug since I have zero context with this
> stack trace, but hopefully it helps.
>

As Russ said, with just a bare traceback with no information about your
code/project it is hard to say where the problem is. However it does give
some clues, see inline comments below.

Traceback (most recent call last):
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\core\servers
> \basehttp.py", line 280, in run
>    self.result = application(self.environ, self.start_response)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\core\servers
> \basehttp.py", line 674, in __call__
>    return self.application(environ, start_response)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\core\handlers
> \wsgi.py", line 241, in __call__
>    response = self.get_response(request)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\core\handlers
> \base.py", line 141, in get_response
>    return self.handle_uncaught_exception(request, resolver,
> sys.exc_info())
>

handle_uncaught_exception getting called after get_response means the code
called to generate a response for the incoming request raised an exception.
What that code was -- your app or one of Django's apps -- would depend on
what request was being processed, from the stacktrace alone we cannot tell.
Based on the ultimate exception that is raised it probably does not matter,
it looks like a key template data structure has been corrupted and likely
lots of innocent code will cause exceptions to be raised as a result.


>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\core\handlers
> \base.py", line 165, in handle_uncaught_exception
>    return debug.technical_500_response(request, *exc_info)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\views
> \debug.py", line 58, in technical_500_response
>    html = reporter.get_traceback_html()
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\views
> \debug.py", line 119, in get_traceback_html
>    t = Template(TECHNICAL_500_TEMPLATE, name='Technical 500
> template')
>
>
DEBUG is apparently True, since Django is attempting to generate a pretty
debug page for this exception.

 File "C:\Python26\Lib\site-packages\django-trunk\django\template
> \__init__.py", line 158, in __init__
>    self.nodelist = compile_string(template_string, origin)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\template
> \__init__.py", line 185, in compile_string
>    parser = parser_class(lexer.tokenize())
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\template
> \debug.py", line 33, in __init__
>    super(DebugParser, self).__init__(lexer)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\template
> \__init__.py", line 251, in __init__
>    self.add_library(lib)
>
>  File "C:\Python26\Lib\site-packages\django-trunk\django\template
> \__init__.py", line 352, in add_library
>    self.tags.update(lib.tags)
>
> AttributeError: 'NoneType' object has no attribute 'tags'
>
>
But it cannot, because things look to be rather broken. Specifically if you
look at the exception and the code in /django/template/__init__.py, it
appears that None has been added to the list of "builtin" template
tag/filter modules. That is a should never happen type situation, so one
question is how things have gotten into that state.

The modules that should be in that list, the ones that are added in the
template __init__.py file itself, are django/template/defaulttags and
django/template/defaultfilters. Grepping through the Django source you can
find that the template loader also adds django/template/loader_tags. None of
those would result in None appearing in the list of builtin template
tag/filter modules unless your Django install is somehow corrupt.

Another possibility is you have some code in your project that attempts to
add something to this builtins list (that is, calls
django.template.add_to_builtins), but whatever it is trying to add does not
actually exist.

Karen

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to