Ticket #22 (closed defect: fixed)
TypeError thrown in pubsub._onSubscriptions: 'Subscription object is not iterable'
| Reported by: | mmalone | Owned by: | ralphm |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | generic | Keywords: | pubsub subscription |
| Cc: |
Description
I'm using idavoll, which is built on top of wokkel, and I'm seeing the following error thrown when I send a request-subscriptions iq:
2008-09-27 18:07:49-0700 [XmlStream,client] Unhandled Error Traceback (most recent call last): File "/Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5-i386.egg/twisted/internet/defer.py", line 106, in maybeDeferred result = f(*args, **kw) File "/Library/Python/2.5/site-packages/wokkel-0.4.0-py2.5.egg/wokkel/pubsub.py", line 713, in _onSubscriptions File "/Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5-i386.egg/twisted/internet/defer.py", line 195, in addCallback callbackKeywords=kw) File "/Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5-i386.egg/twisted/internet/defer.py", line 186, in addCallbacks self._runCallbacks() --- <exception caught here> --- File "/Library/Python/2.5/site-packages/Twisted-8.1.0-py2.5-macosx-10.5-i386.egg/twisted/internet/defer.py", line 328, in _runCallbacks self.result = callback(self.result, *args, **kw) File "/Library/Python/2.5/site-packages/wokkel-0.4.0-py2.5.egg/wokkel/pubsub.py", line 705, in toResponse exceptions.TypeError: 'Subscription' object is not iterable
I've attached a patch to wokkel that fixes this issue for me, but I'm not familiar enough with the internals of wokkel or idavoll to know which is really to blame. It looks like an interface changed, and something didn't get updated properly. Anyways, the attached patch fixes things for me.
Attachments
Change History
Changed 5 years ago by mmalone
- Attachment pubsub-request-subscriptions.diff added
comment:3 Changed 5 years ago by ralphm
Your patch looks great. I added a test case before applying it, and your change makes it happy. The changes are in source:branches/pubsub-subscriptions-22. Merging this to trunk.
Note: See
TracTickets for help on using
tickets.

pubsub request-subscriptions patch