fritteli / pyicqt

Automatically exported from code.google.com/p/pyicqt
GNU General Public License v2.0
0 stars 0 forks source link

Unhandled error in Deferred? #179

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I see in logs:
[2009-06-07 00:27:34] Unhandled error in Deferred:
[2009-06-07 00:27:34] Unhandled error in Deferred:

What it's error?

Original issue reported on code.google.com by ky6uk.kun on 6 Jun 2009 at 6:32

GoogleCodeExporter commented 8 years ago
Only these lines and nothing more?

Original comment by r000ns...@gmail.com on 9 Jun 2009 at 6:31

GoogleCodeExporter commented 8 years ago
Yes. 10-20 lines per day.

Original comment by ky6uk.kun on 9 Jun 2009 at 7:21

GoogleCodeExporter commented 8 years ago
Same string in logs on version pyicqt-0.8.1.5:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:
[2010-05-17 08:17:30] Unhandled error in Deferred:

Original comment by Mur...@gmail.com on 17 May 2010 at 7:28

GoogleCodeExporter commented 8 years ago
Having the same trouble,

[2010-06-07 08:18:52] Unhandled error in Deferred:
[2010-06-07 08:18:52] Unhandled error in Deferred:

and gate appear and disappear in servise discovery every second...

Original comment by frank....@gmail.com on 7 Jun 2010 at 8:31

GoogleCodeExporter commented 8 years ago
Same here:
[2010-11-15 22:21:45] Unhandled error in Deferred:
[2010-11-16 09:09:31] Unhandled error in Deferred:
[2010-11-16 10:44:13] Unhandled error in Deferred:

Original comment by pa...@bk.ru on 16 Nov 2010 at 8:40

GoogleCodeExporter commented 8 years ago
Not sure if it's the same issue (previous info is clearly inconclusive), but 
beginning is the same:

pyicqt[1600]:  Unhandled error in Deferred:
pyicqt[1600]:  Traceback (most recent call last):
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/pyicqt/src/tlib/oscar.py", line 663, in 
dataReceived
pyicqt[1600]:  state=func(flap)
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/pyicqt/src/tlib/oscar.py", line 805, in 
oscar_Data
pyicqt[1600]:  d.errback(snac)
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 388, in 
errback
pyicqt[1600]:  self._startRunCallbacks(fail)
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 455, in 
_startRunCallbacks
pyicqt[1600]:  self._runCallbacks()
pyicqt[1600]:  --- <exception caught here> ---
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 542, in 
_runCallbacks
pyicqt[1600]:  current.result = callback(current.result, *args, **kw)
pyicqt[1600]:  File 
"/usr/lib64/python2.7/site-packages/pyicqt/src/tlib/oscar.py", line 2097, in 
_cbRequestSSI
pyicqt[1600]:  if snac[1] == 0x0f: # same SSI as we have
pyicqt[1600]:  exceptions.TypeError: 'NoneType' object is not subscriptable

Looking at the code, it looks like proper snac (not None) is passed to errback 
chain:

if snac[1]!=1:
        d.callback(snac)
else:
        d.errback(snac)

but is get lost somewhere on the way to _cbRequestSSI, so this code receives 
None:

def _cbRequestSSI(self, snac, args = ()):
        if snac[1] == 0x0f: # same SSI as we have
                return

_ebDeferredError seem to be the first errback for these deferreds and it 
doesn't seem to return anything and indicates a critical errors, so it looks 
like either adding callbacks after that errback (so they'll be processed after 
it with None argument) is wrong or errback itself should re-raise error (or 
return a Failure object) to pass it to next errback, not the callback chain.

Attached patch returns the same Failure, so further errbacks 
(_ebDeferredRequestSSIError) should be called in case of errors instead of 
callbacks (_cbRequestSSI).

Original comment by mk.fraggod@gmail.com on 15 Mar 2011 at 5:48

Attachments: