TemplateSyntaxError: <unprintable TemplateSyntaxError object>

3 views
Skip to first unread message

oakmad

unread,
Aug 8, 2009, 1:07:23 PM8/8/09
to app-engine-django
Hi All,
I'm sure this is something silly I am doing, I see reports of it
from searching but couldn't find a fix. I have downloaded the helper
and am transferring one of my existing Django apps into it. I've
boiled this down into a simple hello world type app in an effort to
get past it but am consistently getting the same error no mater what,
any help MUCH appreciated. Essentially no matter what I do when I hit
my /invite url I get a TemplateSyntaxError: <unprintable
TemplateSyntaxError object> error even when I do not include a
template. Code and trace are below.

Thanks

Adam

urls.py:
from django.conf.urls.defaults import *

urlpatterns = patterns('',
(r'^$','EoF.invite.views.index'), #Catch all, show the home page,
)

views.py:
from django.http import HttpResponse

def index(request):
return HttpResponse("Hello, world. You're at the poll index.")

Here is the stack trace:
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2969, in _HandleRequest
base_env_dict=env_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 406, in Dispatch
base_env_dict=base_env_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2238, in Dispatch
self._module_dict)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2156, in ExecuteCGI
reset_modules = exec_script(handler_path, cgi_path, hook)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/tools/dev_appserver.py", line 2054, in
ExecuteOrImportScript
script_module.main()
File "/Users/adamoakman/Documents/EoF/Code/EoF/main.py", line 48, in
main
util.run_wsgi_app(application)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/
GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/
google/appengine/ext/webapp/util.py", line 76, in run_wsgi_app
result = application(env, _start_response)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/core/handlers/
wsgi.py", line 241, in __call__
response = self.get_response(request)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/core/handlers/
base.py", line 133, in get_response
return self.handle_uncaught_exception(request, resolver, exc_info)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/core/handlers/
base.py", line 153, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/views/
debug.py", line 39, in technical_500_response
html = reporter.get_traceback_html()
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/views/
debug.py", line 112, in get_traceback_html
return t.render(c)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/template/
__init__.py", line 176, in render
return self.nodelist.render(context)
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/template/
__init__.py", line 767, in render
bits.append(self.render_node(node, context))
File "/Users/adamoakman/Documents/EoF/Code/EoF/django/template/
debug.py", line 81, in render_node
raise wrapped
TemplateSyntaxError: <unprintable TemplateSyntaxError object>

oakmad

unread,
Aug 8, 2009, 3:06:08 PM8/8/09
to app-engine-django
OK I found the solution to this by commenting out the code in the
django/template/debug.py

Its a trap for your players essentially, in my existing django
application one added the application to the site in settings with
'mysite.application' e.g. 'mysite.polls'. For this project it actually
is just 'application' or 'polls'. The using page clearly shows just
adding polls but old habits die hard I guess.

Hope this might help someone else some day.

Thanks

Adam

Rahul

unread,
Aug 21, 2009, 6:46:08 AM8/21/09
to app-engine-django
Hi Adam,

I am getting this error.
<type 'exceptions.ImportError'>: cannot import name DebugLexer
args = ('cannot import name DebugLexer',)
message = 'cannot import name DebugLexer'

Please tell me what might be wrong in my case.

Thanks
Rahul
Reply all
Reply to author
Forward
0 new messages