Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#6360 closed defect (fixed)

Changeset [6163] seems to have broken Timeline view

Reported by: jgerlach@… Owned by: Jonas Borgström
Priority: highest Milestone: 0.11
Component: general Version:
Severity: normal Keywords: permission
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

upgraded from 6153 to 0.11dev-r6163. Navigating to Timeline after logging in produced the traceback below. Commenting out lines 174 and 175 of resource.py allows the timeline to be displayed without error.

2007-11-16 06:58:51,201 Trac[main] ERROR: 'NoneType' object is not callable
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/web/main.py", line 386, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/web/main.py", line 217, in dispatch
    data, content_type)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/web/chrome.py", line 620, in render_template
    return stream.render(method, doctype=doctype)
  File "build/bdist.linux-i686/egg/genshi/core.py", line 172, in render
    return encode(generator, method=method, encoding=encoding)
  File "build/bdist.linux-i686/egg/genshi/output.py", line 45, in encode
    output = u''.join(list(iterator))
  File "build/bdist.linux-i686/egg/genshi/output.py", line 274, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 526, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 632, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "build/bdist.linux-i686/egg/genshi/output.py", line 466, in __call__
    for ev in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 273, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 273, in _ensure
    for event in stream:
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/web/chrome.py", line 640, in _generate
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 521, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 279, in _match
    ctxt))
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 521, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 239, in _strip
    event = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 473, in _eval
    result = data.evaluate(ctxt)
  File "build/bdist.linux-i686/egg/genshi/template/eval.py", line 144, in evaluate
    return eval(self.code, _globals, {'data': data})
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/timeline/templates/timeline.html", line 51, in <Expression u"event.render('description', context)">
    ${event.render('description', context)}
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/timeline/web_ui.py", line 281, in <lambda>
    context, field, event)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/versioncontrol/web_ui/changeset.py", line 835, in render_timeline_event
    markup += format_to_html(self.env, context, message)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/wiki/formatter.py", line 1033, in format_to_html
    return HtmlFormatter(env, context, wikidom).generate(escape_newlines)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/wiki/formatter.py", line 992, in generate
    escape_newlines)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/wiki/formatter.py", line 801, in format
    result = re.sub(self.wikiparser.rules, self.replace, line)
  File "/usr/local/lib/python2.5/re.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/wiki/formatter.py", line 746, in replace
    replacement = self.handle_match(fullmatch)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/wiki/formatter.py", line 739, in handle_match
    return external_handler(self, match, fullmatch)
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/ticket/api.py", line 297, in <lambda>
    lambda x, y, z: self._format_link(x, 'ticket', y[1:], y, z))
  File "/usr/local/lib/python2.5/site-packages/Trac-0.11dev_r6163-py2.5.egg/trac/ticket/api.py", line 309, in _format_link
    ticket = formatter.resource('ticket', num)
TypeError: 'NoneType' object is not callable

Attachments (0)

Change History (3)

comment:1 by Christian Boos, 17 years ago

Milestone: 0.11
Priority: normalhighest

Ok - I'll back out that part of the r6163 until I'll fix the situation.

comment:2 by Christian Boos, 17 years ago

OK, I see. The Resource(None) producing a Resource instance is necessary for the "factory" aspect of a resource. So a more correct fix for the problem that r6163 wanted to fix has to be done in the permission layer.

comment:3 by Christian Boos, 17 years ago

Keywords: permission added
Resolution: fixed
Status: newclosed

Fixed in [6164]. Thanks again!

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.