Opened 6 years ago

Last modified 21 months ago

#8003 new defect

AnnouncementSystem failed then no Components are defined

Reported by: victor_sverdlin Owned by:
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


Then "component" list is empty the plugin falls with error:

2010-10-29 16:13:39,008 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/announcerplugin/", line 351, in _real_send
    x for x in sp.get_subscriptions_for_event(evt) if x
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/announcerplugin/", line 351, in <genexpr>
    x for x in sp.get_subscriptions_for_event(evt) if x
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/announcerplugin/subscribers/", line 25, in get_subscriptions_for_event
    for subscriber in self._get_membership(ticket['component']):
  File "build/bdist.freebsd-8.0-STABLE-i386/egg/announcerplugin/subscribers/", line 39, in _get_membership
    """, ('announcer_joinable_component_' + component, "1"))
TypeError: cannot concatenate 'str' and 'NoneType' objects

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by doki_pen

Disable the joinable components plugin. I'll leave the ticket open as we should check this case, but it makes no sense to have the joinable components plugin enabled if you don't use components. (unless it's just that none have been created yet, i guess).

comment:2 Changed 6 years ago by victor_sverdlin

Excuse me my next question - I am new to trac. I cant see joinable components in ini file nor in admin panel. How to disable it?

comment:3 Changed 5 years ago by dannysauer

This code in

    def get_subscriptions_for_event(self, event):
        if event.realm == 'ticket':
            ticket =
            if event.category in ('changed', 'created', 'attachment added'):
                for subscriber in self._get_membership(ticket['component']):
                    self.log.debug("TicketComponentSubscriber added '%s " \
                            "(%s)' for component '%s'"%(
                            subscriber[1], subscriber[2], ticket['component']))
                    yield subscriber

should probably use a default value for the component rather than just trusting that there is a component value set. That would suppress this failure even if the component subscriber, err, component was enabled (which is the default, IIRC). Personally, I'd add a get_ticket_component method rather than directly referencing the array, but the details are less important. :)

comment:4 Changed 21 months ago by rjollos

  • Owner doki_pen deleted

Add Comment

Modify Ticket

as new The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.