Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8754 closed defect (invalid)

AttributeError: 'NoneType' object has no attribute 'label'

Reported by: fhirschberg@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.11.5
Severity: normal Keywords: bitten timeline build configuration
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

How to Reproduce

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

I changed the name of the build configuration and the label to "DailyBuild". Since then the timeline was broken. The Timeline is not usable anymore… How can i fix the timeline view to get the site working again?

Request parameters:

{'daysback': u'30', 'from': u'2009-10-19'}

User Agent was: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.0.14) Gecko/2009090217 Ubuntu/9.04 (jaunty) Firefox/3.0.14

System Information

Trac 0.11.5
Python 2.5.2 (r252:60911, Jul 22 2009, 15:52:25)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)]
setuptools 0.6c9
SQLite 3.4.2
pysqlite 2.3.2
Genshi 0.5.1
mod_python 3.3.1
Pygments 0.9
Bitten 0.6b2
Subversion 1.5.1 (r32289)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 444, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/main.py", line 226, in dispatch
    data, content_type)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/chrome.py", line 765, in render_template
    stream.render(method, doctype=doctype, out=buffer)
  File "build/bdist.linux-i686/egg/genshi/core.py", line 179, in render
    return encode(generator, method=method, encoding=encoding, out=out)
  File "build/bdist.linux-i686/egg/genshi/output.py", line 61, in encode
    for chunk in iterator:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 311, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 753, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 592, in __call__
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/output.py", line 698, in __call__
    for kind, data, pos in chain(stream, [(None, None, None)]):
  File "build/bdist.linux-i686/egg/genshi/output.py", line 532, in __call__
    for ev in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/chrome.py", line 830, in _strip_accesskeys
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/web/chrome.py", line 819, in _generate
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 298, in _match
    ctxt, start=idx + 1, **vars):
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 245, in _match
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 533, in _eval
    for event in substream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 496, in _eval
    for kind, data, pos in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 551, in _flatten
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/core.py", line 283, in _ensure
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/path.py", line 141, in _generate
    subevent = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 569, in _include
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/markup.py", line 234, in _strip
    event = stream.next()
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 543, in _exec
    for event in stream:
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 520, in _eval
    result = _eval_expr(data, ctxt, **vars)
  File "build/bdist.linux-i686/egg/genshi/template/base.py", line 286, in _eval_expr
    retval = expr.evaluate(ctxt)
  File "build/bdist.linux-i686/egg/genshi/template/eval.py", line 180, in evaluate
    return eval(self.code, _globals, {'__data__': data})
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/timeline/templates/timeline.html", line 41, in <Expression u"event.render('title', context)">
    <span class="time">${format_time(event.date, str('%H:%M'))}</span> ${event.render('title', context)}
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/timeline/web_ui.py", line 294, in <lambda>
    provider.render_timeline_event(context, field, event)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/attachment.py", line 476, in render_timeline_event
    name = get_resource_name(self.env, attachment.parent)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/resource.py", line 338, in get_resource_name
    return get_resource_description(env, resource)
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/resource.py", line 335, in get_resource_description
    return manager.get_resource_description(resource, format, **kwargs)
  File "/usr/lib/python2.5/site-packages/Bitten-0.6b2-py2.5.egg/bitten/main.py", line 130, in get_resource_description
    config_label = config.label or config_name
AttributeError: 'NoneType' object has no attribute 'label'

Attachments (0)

Change History (4)

comment:1 by Remy Blank, 15 years ago

Resolution: invalid
Status: newclosed

This is an issue with Bitten, please report it on the Bitten Trac at http://bitten.edgewall.org/.

comment:2 by osimons, 15 years ago

No need to report it again - I spotted this ticket and have fixed it already in bitten:changeset:782. Update to latest from Bitten 0.6.x branch to get your Trac timeline working again.

comment:3 by anonymous, 15 years ago

Thanks for helping so fast! I'll try it with the fixed version today.

comment:4 by anonymous, 15 years ago

Works like a charm!

But one short question… Line 130 in main.py was changed to this:

config_label = config and config.label and config.label or config_name

Isn't the second "and config.label" futile? Or do i miss something?

Thanks for the patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.