Roundup Tracker - Issues

Issue 1108697

classification
Title: exceptions.AttributeError: Can't access missing value
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: richard Nosy List: richard
Priority: normal Keywords:

Created on 2005-01-24 22:32 by anonymous, last changed 2005-02-14 04:52 by richard.

Messages
msg1838 Author: [hidden] (anonymous) Date: 2005-01-24 22:32
If you have any questions about this I can be reached
at greg_w_moore@ctb.com.

using version 0.80b2
Given that:
schema.py contains:
	project = Class(db, "project", name=String(),
state=Link('projectstate'))
	project.setkey("name")

And that issue.item.html contains"

<tr><td> </tr><th>project state</th>
    <td tal:content="context/project/state" />

Results in the following.

Templating Error

exceptions.AttributeError: Can't access missing value

Debugging information follows

   1. Looking for "state", current path:
         1. "project" (<HTMLProperty(0x13206e8) project
<roundup.hyperdb.Link to "project"> None>)
   2. In path expression "project/state"
   3. While evaluating the
standard:'context/project/state' expression on line 79
      Current variables:
      templates	<roundup.cgi.templating.Templates
instance at 0x012F83C8>
      repeat
<roundup.cgi.PageTemplates.TALES.SafeMapping instance
at 0x0131DC88>
      false	0
      context	<HTMLClass(0x131db98) issue>
      utils	<roundup.cgi.templating.TemplatingUtils
instance at 0x0131DB70>
      db	<roundup.cgi.templating.HTMLDatabase instance
at 0x0131DB20>
      nothing	None
      i18n
<roundup.cgi.TranslationService.NullTranslationService
instance at 0x012F8418>
      true	1
      default	<roundup.cgi.PageTemplates.TALES.Default
instance at 0x00AE1A30>
      request	<roundup.cgi.templating.HTMLRequest
instance at 0x013061C0>
      tracker	<roundup.instance.Tracker instance at
0x00F24E40>
      template	<Roundup PageTemplate 'issue.item.html'>
      config	<roundup.configuration.CoreConfig instance
at 0x012986E8>
      options	{'ok_message': [], 'error_message': []}
      loop	<roundup.cgi.PageTemplates.TALES.SafeMapping
instance at 0x0131DC88>
      attrs	{'tal:content': 'context/project/state'}
   4. A problem occurred in your template
"issue.item.html".

Full traceback:

Traceback (most recent call last):
  File
"C:\Python23\Lib\site-packages\roundup\cgi\client.py",
line 686, in renderContext
    result = pt.render(self, None, None, **args)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\templating.py",
line 318, in render
    getEngine().getContext(c), output, tal=1,
strictinsert=0)()
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 192, in __call__
    self.interpret(self.program)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 236, in interpret
    handlers[opcode](self, args)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 666, in do_useMacro
    self.interpret(macro)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 236, in interpret
    handlers[opcode](self, args)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 411, in do_optTag_tal
    self.do_optTag(stuff)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 396, in do_optTag
    return self.no_tag(start, program)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 391, in no_tag
    self.interpret(program)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 236, in interpret
    handlers[opcode](self, args)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 689, in do_defineSlot
    self.interpret(slot)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 236, in interpret
    handlers[opcode](self, args)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\TAL\TALInterpreter.py",
line 486, in do_insertText_tal
    text = self.engine.evaluateText(stuff[0])
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\TALES.py",
line 233, in evaluateText
    text = self.evaluate(expr)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\TALES.py",
line 227, in evaluate
    return expression(self)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\Expressions.py",
line 194, in __call__
    return self._eval(econtext)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\Expressions.py",
line 182, in _eval
    ob = self._subexprs[-1](econtext)
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\Expressions.py",
line 138, in _eval
    ob = restrictedTraverse(ob, path, getSecurityManager())
  File
"C:\Python23\Lib\site-packages\roundup\cgi\PageTemplates\Expressions.py",
line 324, in restrictedTraverse
    o = object[name]
  File
"C:\Python23\Lib\site-packages\roundup\cgi\templating.py",
line 1527, in __getattr__
    raise AttributeError, "Can't access missing value"
AttributeError: Can't access missing value
msg1839 Author: [hidden] (richard) Date: 2005-02-14 04:52
Logged In: YES 
user_id=6405

This is a bug in your template - it's trying to display the state property of a 
missing value. 
 
I've changed the templating code to give a nicer error. 
 
History
Date User Action Args
2005-01-24 22:32:48anonymouscreate