Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#4348 closed defect (invalid)

NameError: Variable "Undefined" is not defined

Reported by: florian Owned by: Jonas Borgström
Priority: high Milestone:
Component: ticket system Version: devel
Severity: blocker Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

While doing a GET operation on /ticket/46, Trac issued an internal error.

To state that I do *not* have outdated templates

[root@copperhead trac]# pwd
/root/packages/trac
[root@copperhead trac]# svn info
Path: .
URL: http://svn.edgewall.org/repos/trac/trunk
Repository Root: http://svn.edgewall.org/repos/trac
Repository UUID: af82e41b-90c4-0310-8c96-b1721e28e2e2
Revision: 4408
Node Kind: directory
Schedule: normal
Last Changed Author: cboos
Last Changed Rev: 4406
Last Changed Date: 2006-12-05 16:24:57 +0100 (Tue, 05 Dec 2006)

[root@copperhead trac]# find / -name ticket_view.html
/root/packages/trac/templates/ticket_view.html
[root@copperhead trac]# ls -l /usr/share/trac /usr/local/share/trac
lrwxrwxrwx  1 root root 19 Dec  6 14:12 /usr/local/share/trac -> /root/packages/trac
lrwxrwxrwx  1 root root 19 Nov 28 13:39 /usr/share/trac -> /root/packages/trac

System Information

Python 2.3.4 (#1, Sep 26 2006, 17:23:01)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)]
Subversion 1.4.0
SQLite 3.3.8
pysqlite 2.3.2

Python Traceback

Traceback (most recent call last):
  File "/root/packages/trac/trac/web/main.py", line 395, in dispatch_request
    dispatcher.dispatch(req)
  File "/root/packages/trac/trac/web/main.py", line 227, in dispatch
    content_type)
  File "/root/packages/trac/trac/web/chrome.py", line 541, in render_template
    return stream.render(method, doctype=doctype)
  File "/root/packages/genshi/genshi/core.py", line 147, in render
    output = u''.join(list(generator))
  File "/root/packages/genshi/genshi/output.py", line 203, in __call__
    for kind, data, pos in stream:
  File "/root/packages/genshi/genshi/output.py", line 489, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "/root/packages/genshi/genshi/output.py", line 439, in __call__
    for kind, data, pos in stream:
  File "/root/packages/genshi/genshi/core.py", line 208, in _ensure
    for event in stream:
  File "/root/packages/genshi/genshi/core.py", line 208, in _ensure
    for event in stream:
  File "/root/packages/trac/trac/web/chrome.py", line 561, in _strip_accesskeys
    for kind, data, pos in stream:
  File "/root/packages/genshi/genshi/core.py", line 208, in _ensure
    for event in stream:
  File "/root/packages/trac/trac/web/chrome.py", line 550, in _generate
    for kind, data, pos in stream:
  File "/root/packages/genshi/genshi/template/markup.py", line 191, in _include
    for event in stream:
  File "/root/packages/genshi/genshi/template/markup.py", line 259, in _match
    content = list(self._include(content, ctxt))
  File "/root/packages/genshi/genshi/template/markup.py", line 191, in _include
    for event in stream:
  File "/root/packages/genshi/genshi/template/markup.py", line 234, in _match
    for event in stream:
  File "/root/packages/genshi/genshi/template/markup.py", line 223, in _strip
    event = stream.next()
  File "/root/packages/genshi/genshi/template/core.py", line 297, in _eval
    for kind, data, pos in stream:
  File "/root/packages/genshi/genshi/template/core.py", line 347, in _flatten
    for event in self._flatten(substream, ctxt):
  File "/root/packages/genshi/genshi/template/core.py", line 346, in _flatten
    substream = _apply_directives(substream, ctxt, directives)
  File "/root/packages/genshi/genshi/template/core.py", line 144, in _apply_directives
    stream = directives[0](iter(stream), ctxt, directives[1:])
  File "/root/packages/genshi/genshi/template/directives.py", line 590, in __call__
    matched = bool(self.expr.evaluate(ctxt))
  File "/root/packages/genshi/genshi/template/eval.py", line 114, in evaluate
    {'data': data})
  File "ticket_view.html", line 1, in <Expression u"isinstance(version, Undefined)">
  File "/root/packages/genshi/genshi/template/eval.py", line 158, in __getattr__
    self.throw()
  File "/root/packages/genshi/genshi/template/eval.py", line 171, in throw
    raise NameError('Variable "%s" is not defined' % self._name)
NameError: Variable "Undefined" is not defined

Attachments (0)

Change History (4)

comment:1 by anonymous, 18 years ago

Genshi==0.4dev-r466

comment:2 by anonymous, 18 years ago

Resolution: invalid
Status: newclosed

The solution to this one was to remove old genshi eggs in site-packages, even though I had the egg-link for the development version to genshi and had that egg-link entered in easy-install.pth.

comment:3 by Christian Boos, 18 years ago

Right, see related discussion in #G76.

I'll make a note about the requirement on the milestone:0.11 page.

comment:4 by Christopher Lenz, 18 years ago

AFAICT this was never a problem on Genshi 0.3.x versions.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.