Modify

Opened 4 years ago

Last modified 2 years ago

#8120 new defect

UserChangeSubscriber causes “tuple index out of range” errors

Reported by: anonymous Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.12

Description

2010-11-21 19:53:46,537 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/api.py", line 536, in _real_send
    subscriptions = self.resolver.subscriptions(evt)
  File "/usr/local/lib/python2.6/dist-packages/TracAnnouncer-0.12.1.dev-py2.6.egg/announcer/api.py", line 354, in subscriptions
    ordered_subs = sorted(subscriptions, key=itemgetter(1,2,3,6))
IndexError: tuple index out of range

It appears that UserChangeSubscriber is, at least sometimes, returning tuples that are only 4 items long. I am not entirely clear on why (or how) this is happening. In looking at the data stored in the subscription_attribute table, “target” is always blank, so I am not entirely sure that this subscriber isn’t simply broken.

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by anonymous

This issue continued to occur even after UserChangeSubscriber was disabled. I have no idea what‘s going on here, and have resorted to filtering out any tuples that are shorter than they are supposed to be by changing [x for x in sp.matches(event) if x] to [x for x in sp.matches(event) if x and len(x) > 6] in SubscriptionResolver.subscriptions.

comment:2 Changed 2 years ago by doki_pen

  • Owner changed from doki_pen to hasienda

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.