grok 1.0a4 using paster
When there is an issue in a TAL file, grok does not tell you which template threw the error, or much of any other useful information in debugging the problem.
Sample error message below, which was introduced by changing 'sorted' to 'sortedd' in the line below:
<div tal:repeat="post python:sorted(context['posts'],lambda x, y: int(y)-int(x))">
2009-06-15 10:01:58,360 ERROR [SiteError] http://localhost:8080/scs/blog/@@index
Traceback (most recent call last):
File "/Users/thibaud/.buildout/eggs/zope.publisher-3.4.6-py2.5.egg/zope/publisher/publish.py", line 133, in publish
result = publication.callObject(request, obj)
File "/Users/thibaud/.buildout/eggs/grok-1.0a3-py2.5.egg/grok/publication.py", line 89, in callObject
return super(ZopePublicationSansProxy, self).callObject(request, ob)
File "/Users/thibaud/.buildout/eggs/zope.app.publication-3.4.3-py2.5.egg/zope/app/publication/zopepublication.py", line 167, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "/Users/thibaud/.buildout/eggs/zope.publisher-3.4.6-py2.5.egg/zope/publisher/publish.py", line 108, in mapply
return debug_call(obj, args)
File "/Users/thibaud/.buildout/eggs/zope.publisher-3.4.6-py2.5.egg/zope/publisher/publish.py", line 114, in debug_call
return obj(*args)
File "/Users/thibaud/.buildout/eggs/grokcore.view-1.5-py2.5.egg/grokcore/view/components.py", line 63, in __call__
return self._render_template()
File "/Users/thibaud/.buildout/eggs/grokcore.view-1.5-py2.5.egg/grokcore/view/components.py", line 67, in _render_template
return self.template.render(self)
File "/Users/thibaud/.buildout/eggs/grokcore.view-1.5-py2.5.egg/grokcore/view/components.py", line 228, in render
return template.pt_render(namespace)
File "/Users/thibaud/.buildout/eggs/zope.pagetemplate-3.4.0-py2.5.egg/zope/pagetemplate/pagetemplate.py", line 115, in pt_render
strictinsert=0, sourceAnnotations=sourceAnnotations)()
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 271, in __call__
self.interpret(self.program)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 346, in interpret
handlers[opcode](self, args)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 891, in do_useMacro
self.interpret(macro)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 346, in interpret
handlers[opcode](self, args)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 534, in do_optTag_tal
self.no_tag(stuff[-2], stuff[-1])
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 516, in no_tag
self.interpret(program)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 346, in interpret
handlers[opcode](self, args)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 949, in do_defineSlot
self.interpret(slot)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 346, in interpret
handlers[opcode](self, args)
File "/Users/thibaud/.buildout/eggs/zope.tal-3.4.1-py2.5.egg/zope/tal/talinterpreter.py", line 822, in do_loop_tal
iterator = self.engine.setRepeat(name, expr)
File "/Users/thibaud/.buildout/eggs/zope.tales-3.4.0-py2.5.egg/zope/tales/tales.py", line 682, in setRepeat
expr = self.evaluate(expr)
File "/Users/thibaud/.buildout/eggs/zope.tales-3.4.0-py2.5.egg/zope/tales/tales.py", line 696, in evaluate
return expression(self)
File "/Users/thibaud/.buildout/eggs/zope.tales-3.4.0-py2.5.egg/zope/tales/pythonexpr.py", line 59, in __call__
return eval(self._code, vars)
File "<string>", line 1, in <module>
NameError: name 'sortedd' is not defined