python - twisted: unhelpful "AlreadyCalled" error -


My twisted python program sometimes sends this message very much:

  Unchecked error in Defined: Traceback (most recent call final): Result found in the file "c: \ python25 \ lib \ site-packages \ twisted \ internet \ defer.py", line 757, (R, G, Deferred.errback () file "c: \ python25 \ lib \ site-packages \ twisted \" in the file "c: \ python25 \ Lib \ site-packages \ twisted \ internet \ defer.py", line 747, _inline callback. Internet \ defer.py ", line 269, in pi . _startRunCallbacks (unsuccessful) file "c: \ python25 \ lib \ site-packages \ twisted \ internet \ defer.py", line 312, _startRunCallbacks in self._runCallbacks () --- & lt; Exception caught here & gt; --- "self": self.result = callback (self.result, * args, ** kw) file "c: \ python25 \ lib \ site-packages \ twisted \ internet \ defer.py", line 328, _runCallbacks "c : \ Python25 \ lib \ site-packages \ twisted \ internet \ defer.py ", line 243, in callback self. _startRunCallbacks (result) file "c: \ python25 \ lib \ site-packages \ twisted \ internet \ defer.py", in line 298, _startRunCallbacks AlreadyCalledError twisted.internet.defer.AlreadyCalledError raise:  

This is not very useful, because this is not a reference to my source code ... I can also by using defer.inline callback . Can anybody be wrong with the idea?

If you do not have any other signals about getting wrong (such as due to your unit tests Pointing to specific cases, or if Pfank's answer does not explain why this is happening) to get information about enabling drafting defragment where the first (and only allowed) results Specified deferred: twisted.internet import defer defer.setD Ebugging (true) to

   

or

  twistd - -debug [...]  

or

  test - debug [...]  

You will get additional stack marks with error reports such as you The additional stack marks faced by you will tell you where the deferred question was created in the problem and where it was applied before. (Callback () or .errback () was called.)

Since you inline callback , you do not get any actual stack trace, where a real error is happening , But information about where the first diffrared has been triggered, can give you an indication of where the activation can come from later on.

Unfortunately the added blackout is just the cost of using the inline callback at this time. This is probably incomparable, but someone needs to take that task.


Comments