Roundup Tracker - Issues

Issue 923199

classification
Templating error in default 0.7.0b1 demo
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : jeroen_h, richard, wc2so1
Priority: normal :

Created on 2004-03-25 15:43 by jeroen_h, last changed 2004-03-25 15:43 by jeroen_h.

Messages
msg1153 Author: [hidden] (jeroen_h) Date: 2004-03-25 15:43
I followed the installation instructions as outlined in the 
docs 

version 0.7.0b1
OS: windows XP
Python 2.3.3
win32all (current)

unit tests passed (no errors)

started demo with "python demo.py"
logged into the web interface as admin/admin
clicking on "Class List" gives the error below

----------------------------------------------------
Templating Error
exceptions.NameError: global name 'm' is not defined

Debugging information follows

While evaluating the standard:'db/classes' expression 
on line 7 Current variables: 
templates <roundup.cgi.templating.Templates instance 
at 0x00CF7620> 
repeat 
<roundup.cgi.PageTemplates.TALES.SafeMapping 
instance at 0x00CF7698> 
default <roundup.cgi.PageTemplates.TALES.Default 
instance at 0x00B84FD0> 
db <roundup.cgi.templating.HTMLDatabase instance at 
0x00CF75D0> 
utils <roundup.cgi.templating.utils instance at 
0x00CF75F8> 
request <roundup.cgi.templating.HTMLRequest 
instance at 0x00CEFD50> 
tracker <module '_roundup_tracker_1' 
from 'E:\roundup\trackers\omptest\__init__.pyo'> 
nothing None 
config <module '_roundup_tracker_1.config' 
from 'E:\roundup\trackers\omptest\config.pyo'> 
options {'ok_message': [], 'error_message': []} 
loop <roundup.cgi.PageTemplates.TALES.SafeMapping 
instance at 0x00CF7698> 
attrs {'tal:repeat': 'cl db/classes'} 

A problem occurred in your 
template "home.classlist.html". 
Full traceback: 
Traceback (most recent call last):
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\client.py", line 510, in renderContext
    result = pt.render(self, None, None, **args)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\templating.py", line 235, in render
    getEngine().getContext(c), output, tal=1, 
strictinsert=0)()
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 154, in 
__call__
    self.interpret(self.program)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 525, in 
do_useMacro
    self.interpret(macro)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 345, in 
do_optTag_tal
    self.do_optTag(stuff)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 330, in 
do_optTag
    return self.no_tag(start, program)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 325, in 
no_tag
    self.interpret(program)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 549, in 
do_defineSlot
    self.interpret(slot)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 186, in 
interpret
    handlers[opcode](self, args)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\TAL\TALInterpreter.py", line 474, in 
do_loop_tal
    iterator = self.engine.setRepeat(name, expr)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\PageTemplates\TALES.py", line 211, in 
setRepeat
    expr = self.evaluate(expr)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\PageTemplates\TALES.py", line 226, in 
evaluate
    v = expression(self)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\PageTemplates\Expressions.py", line 189, 
in __call__
    return self._eval(econtext)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\PageTemplates\Expressions.py", line 184, 
in _eval
    return render(ob, econtext.vars)
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\PageTemplates\Expressions.py", line 90, 
in render
    ob = ob()
  File "E:\roundup\roundup-0.7.0b1
\roundup\cgi\templating.py", line 276, in classes
    m.append(HTMLClass(self._client, item))
NameError: global name 'm' is not defined

 

 
msg1154 Author: [hidden] (wc2so1) Date: 2004-03-25 18:39
Logged In: YES 
user_id=424987

This has been fixed in cvs.  The problem was the list was
named "r" and the code said "m.append"

msg1155 Author: [hidden] (richard) Date: 2004-03-25 20:40
Logged In: YES 
user_id=6405

I just close bugs when a fix is checked in. 
History
Date User Action Args
2004-03-25 15:43:38jeroen_hcreate