I converted my project into a standalone exe program with py2exe. Now when
i load a webpage i get the following error
{{{
ERROR:tornado.application:Uncaught exception, closing connection.
Traceback (most recent call last):
File "tornado\iostream.pyc", line 354, in wrapper
File "tornado\stack_context.pyc", line 331, in wrapped
File "tornado\stack_context.pyc", line 302, in wrapped
File "tornado\httpserver.pyc", line 328, in _on_headers
File "tornado\wsgi.pyc", line 251, in __call__
File "django\core\handlers\wsgi.pyc", line 206, in __call__
File "django\core\handlers\base.pyc", line 196, in get_response
File "django\core\handlers\base.pyc", line 231, in
handle_uncaught_exception
File "django\views\debug.pyc", line 69, in technical_500_response
File "django\views\debug.pyc", line 322, in get_traceback_html
File "django\template\base.pyc", line 125, in __init__
File "django\template\base.pyc", line 152, in compile_string
File "django\template\debug.pyc", line 35, in __init__
File "django\template\base.pyc", line 239, in __init__
File "django\template\base.pyc", line 353, in add_library
AttributeError: 'NoneType' object has no attribute 'tags'
ERROR:tornado.application:Exception in callback <functools.partial object
at 0x0
3658DB0>
Traceback (most recent call last):
File "tornado\ioloop.pyc", line 477, in _run_callback
File "tornado\stack_context.pyc", line 331, in wrapped
File "tornado\stack_context.pyc", line 302, in wrapped
File "tornado\iostream.pyc", line 354, in wrapper
File "tornado\stack_context.pyc", line 331, in wrapped
File "tornado\stack_context.pyc", line 302, in wrapped
File "tornado\httpserver.pyc", line 328, in _on_headers
File "tornado\wsgi.pyc", line 251, in __call__
File "django\core\handlers\wsgi.pyc", line 206, in __call__
File "django\core\handlers\base.pyc", line 196, in get_response
File "django\core\handlers\base.pyc", line 231, in
handle_uncaught_exception
File "django\views\debug.pyc", line 69, in technical_500_response
File "django\views\debug.pyc", line 322, in get_traceback_html
File "django\template\base.pyc", line 125, in __init__
File "django\template\base.pyc", line 152, in compile_string
File "django\template\debug.pyc", line 35, in __init__
File "django\template\base.pyc", line 239, in __init__
File "django\template\base.pyc", line 353, in add_library
AttributeError: 'NoneType' object has no attribute 'tags'
}}}
To fix that problem I add a condition in `add_to_builtins`. This
add_to_builtins:
https://github.com/django/django/blob/master/django/template/base.py#L1353
My `add_to_builtins` :
{{{
def add_to_builtins(module):
mod_imported = import_library(module)
if mod_imported != None :
builtins.append(mod_imported)
}}}
Don't know if I fix that problem by the right way but that work for me.
--
Ticket URL: <https://code.djangoproject.com/ticket/23032>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/23032#comment:1>
* version: 1.6 => master
--
Ticket URL: <https://code.djangoproject.com/ticket/23032#comment:2>
Comment (by timo):
I'm concerned that the fix may be hiding an actual problem with your
project. Can you check what the attempted imported module name is when
`None` is added to `builtins`?
--
Ticket URL: <https://code.djangoproject.com/ticket/23032#comment:3>
* status: new => closed
* resolution: => needsinfo
--
Ticket URL: <https://code.djangoproject.com/ticket/23032#comment:4>