Opened 4 years ago

Closed 3 years ago

Error sending notification when no component

Reported by: Owned by: tom.deneau@… rjollos normal AnnouncerPlugin normal hasienda, kunwoo.lee@… 0.12

Description

I had a project where there were no components enabled. I had smtp_always_cc set up but mails were not being sent. The log file contained:

2012-12-20 22:54:35,070 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/api.py", line 351, in _real_send
x for x in sp.get_subscriptions_for_event(evt) if x
File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/api.py", line 351, in <genexpr>
x for x in sp.get_subscriptions_for_event(evt) if x
File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/subscribers/ticket_components.py", line 25, in get_subscriptions_for_event
for subscriber in self._get_membership(ticket['component']):
File "/usr/local/lib/python2.7/dist-packages/TracAnnouncer-0.11.1_r10458-py2.7.egg/announcerplugin/subscribers/ticket_components.py", line 39, in _get_membership
""", ('announcer_joinable_component_' + component, "1"))
TypeError: cannot concatenate 'str' and 'NoneType' objects



When I added a single dummy component, notifications worked properly and the above did not appear in the logs.

comment:1 Changed 4 years ago by rjollos

• Owner changed from hasienda to rjollos
• Status changed from new to assigned

It looks like you've installed from the 0.11 branch. I've tested and the issue is fixed on the trunk. Since you report that you are running Trac 0.12, your Trac instance will be compatible with the current trunk. Are you able to upgrade? If not, I suppose we can look at pushing a fix to the 0.11 branch.

comment:2 Changed 4 years ago by rjollos

• Cc hasienda added; anonymous removed

comment:3 Changed 4 years ago by anonymous

For now having a single dummy component is OK with us.

The announcer plugin is shared among all the projects so I will have to check with the overall trac administrator here about upgrading the plugin.

comment:4 Changed 4 years ago by hasienda

Because many don't read changeset messages and other development information when jumping at a development release I do explicitly warn you about the preliminary capabilities of current trunk.

Especially be prepared to loose all custom user settings. This is the worst case, but as a matter of fact full migration support to current subscription schema is still pending, because so much has been changed since the 0.11 release.

OTOH your admins will be forced to upgrade anyway, as soon as they'll attempt to upgrade to Trac-1.0, because all other plugin versions don't work with current stable and will even cause nasty side-effects for Trac and other plugins.

comment:5 in reply to: ↑ description Changed 4 years ago by hasienda

When I added a single dummy component, notifications worked properly and the above did not appear in the logs.

Already thought about/tried to disable just that module, because obviously you have no use for it in that Trac environment, right?

comment:6 Changed 3 years ago by rjollos

• Resolution set to worksforme
• Status changed from assigned to closed

I'm going to close this since the issue has previously been fixed on the trunk, the trunk will remain compatible with 0.11 and the reporter has a workaround to hold them over until they are able to upgrade.

hasienda: please reopen if you see a reason to.

Fine for me.