On 03:40 pm, drsalists@gmail.com wrote:
Strangely, this doesn't give the report until after the sleep finishes... ?
What's strange about that? "time.sleep(10)" doesn't mean "immediately print out debug information". It means "do not do anything at all in this program for around 10 seconds".
It turned out that I needed to print d._debugInfo._getDebugTracebacks(), rather than just running d._debugInfo._getDebugTracebacks().
However, it always appears to print the debug tracebacks for the deferred named - in this case, d. It doesn't appear to be selecting the correct deferred(s) to print.
All it does is print the debug information for the Deferred you got the _debugInfo attribute from. It doesn't understand your code or know where the source of your error is. It's just a function that gives you the stack traces associated with a particular Deferred. If you want a different stack trace, call the method on a _debugInfo from a different Deferred object. Jean-Paul