Modify ↓
Opened 14 years ago
Closed 8 years ago
#8003 closed defect (wontfix)
AnnouncementSystem failed then no Components are defined
Reported by: | Victor S. Sverdlin | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
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/api.py", 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/api.py", 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/ticket_components.py", 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/ticket_components.py", line 39, in _get_membership """, ('announcer_joinable_component_' + component, "1")) TypeError: cannot concatenate 'str' and 'NoneType' objects
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
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 13 years ago by
This code in ticket_components.py
def get_subscriptions_for_event(self, event): if event.realm == 'ticket': ticket = event.target 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 10 years ago by
Owner: | Robert Corsaro deleted |
---|
comment:5 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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).