I am using Python 2.3.4. I have a user account with no
user defined queries. When I click on the Edit button
(the link to
https://localhost/bugs/babel/query?@template=edit), I
get the following traceback:
Templating Error
exceptions.NameError: global name 'x' is not defined
Debugging information follows
1. In python expression
"db.query.filter(filterspec={'private_for':None})"
2. While evaluating the expression on line 84
Current variables:
templates <roundup.cgi.templating.Templates
instance at 0x4087738c>
repeat
<roundup.cgi.PageTemplates.TALES.SafeMapping instance
at 0x40a0480c>
false 0
context <HTMLClass(0x40a046ac) query>
utils <roundup.cgi.templating.TemplatingUtils
instance at 0x40a0474c>
db <roundup.cgi.templating.HTMLDatabase instance
at 0x40a0476c>
nothing None
i18n
<roundup.cgi.TranslationService.NullTranslationService
instance at 0x409ee8ec>
true 1
default <roundup.cgi.PageTemplates.TALES.Default
instance at 0x40820b4c>
request <roundup.cgi.templating.HTMLRequest
instance at 0x409fd60c>
tracker <roundup.instance.Tracker instance at
0x4086b0cc>
template <Roundup PageTemplate 'query.edit.html'>
config <roundup.configuration.CoreConfig instance
at 0x4086baec>
options {'ok_message': [], 'error_message': []}
loop <roundup.cgi.PageTemplates.TALES.SafeMapping
instance at 0x40a0480c>
mine <HTMLProperty(0x40a04d8c) user6@queries
<roundup.hyperdb.Multilink to "query"> []>
attrs {'tal:define': "queries
python:db.query.filter(filterspec={'private_for':None})",
'tal:repeat': 'query queries'}
uid '6'
3. A problem occurred in your template
"query.edit.html".
Full traceback:
Traceback (most recent call last):
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/client.py",
line 686, in renderContext
result = pt.render(self, None, None, **args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/templating.py",
line 318, in render
getEngine().getContext(c), output, tal=1,
strictinsert=0)()
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 192, in __call__
self.interpret(self.program)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 666, in do_useMacro
self.interpret(macro)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 411, in do_optTag_tal
self.do_optTag(stuff)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 396, in do_optTag
return self.no_tag(start, program)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 391, in no_tag
self.interpret(program)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 689, in do_defineSlot
self.interpret(slot)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 632, in do_condition
self.interpret(block)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 236, in interpret
handlers[opcode](self, args)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/TAL/TALInterpreter.py",
line 462, in do_setLocal_tal
self.engine.setLocal(name,
self.engine.evaluateValue(expr))
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/PageTemplates/TALES.py",
line 227, in evaluate
return expression(self)
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/PageTemplates/PythonExpr.py",
line 69, in __call__
return f()
File "<string>", line 2, in f
File
"/usr/local/roundup-0.8.0/lib/python2.3/site-packages/roundup/cgi/templating.py",
line 617, in filter
l = [HTMLItem(self._client, self.classname, x)
NameError: global name 'x' is not defined
|