Strategy for finding source of unhandled error in Deferred

Alex Railean <[email protected]>
Newsgroups gmane.comp.python.twisted
Message-ID <[email protected]>
Hello,

I have inherited a misbehaving system and am trying to troubleshoot it. The code
is not documented and I cannot produce a minimal working example that illustrates
the problem yet, as I don't know which parts are involved and how they relate.

The version of Twisted used is 16.1.1, running on Fedora 15.


My first attempt is to leverage Twisted's logging capabilities and retrieve
information about the place in the code that leads to the error:

from twisted.python import log as twisted_log
observer = twisted_log.PythonLoggingObserver(loggerName='twcore')
observer.start()



This produces the following entries in the log:
Unhandled error in Deferred:
CRITICAL _legacy       twcore Unhandled error in Deferred:

Traceback (most recent call last):
Failure: __builtin__.type: <class 'twisted.internet.error.TimeoutError'>
CRITICAL _legacy       twcore



How can I get more clues about what is going on? I was expecting a line number,
or a complete call-stack.


What are the recommended troubleshooting steps for finding the Deferred in which
the error occurred?  There are are around 30 of them throughout the code, is
there a heuristic I can use to narrow down the list of suspects?








_______________________________________________
Twisted-Python mailing list
[email protected]
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.