Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

My Deferred or DeferredList never fires, so my program just mysteriously hangs! Whats wrong?

0
Posted

My Deferred or DeferredList never fires, so my program just mysteriously hangs! Whats wrong?

0

It really depends on what your program is doing, but the most common cause is this: it is firing — but it’s an error, not a success, and you have forgotten to add an errback, so nothing happens. Always add errbacks! The reason Deferred can’t automatically show your errors is because a Deferred can still have callbacks and errbacks added to it even after a result is available — so we have no reasonable place to put a logging call that wouldn’t result in spurious tracebacks that are handled later on. There is a facility for printing tracebacks when the Deferreds are garbage collected — call defer.setDebugging(True) to enable it.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.