[Twisted-Python] @inlineCallbacks eat the traceback. Help?
It seems that @inlineCallbacks trashes the error traceback when you yield a Deferred that emits an error. That's not very social behavior. Any ideas how to get the traceback back? This is Twisted 2.5. Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 37, in callWithContext return func(*args,**kw) File "/usr/lib/python2.5/site-packages/twisted/internet/threads.py", line 25, in _putResultInDeferred result = f(*args, **kwargs) File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 813, in unwindGenerator return _inlineCallbacks(None, f(*args, **kwargs), Deferred()) File "/usr/lib/python2.5/site-packages/twisted/internet/defer.py", line 724, in _inlineCallbacks result = g.throw(result.type, result.value, result.tb) --- <exception caught here> --- File "/var/lib/python-support/python2.5/homevent/worker.py", line 153, in _process r = yield w.process(event=self.event, queue=self) exceptions.TypeError: float() argument must be a string or a number -- Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf@smurf.noris.de Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de - - Know when to quit.
On Tue, 4 Dec 2007 22:24:33 +0000 (UTC), Matthias Urlichs
It seems that @inlineCallbacks trashes the error traceback when you yield a Deferred that emits an error. That's not very social behavior.
Any ideas how to get the traceback back?
One possibility is to not use inlineCallbacks. Another possibility is to wait for the next release of Twisted, which will have some additional functionality in this area and may be able to provide the correct traceback (but no promises). This is implemented already, so you could check out trunk and give it a try. Jean-Paul
participants (2)
-
Jean-Paul Calderone
-
Matthias Urlichs