[Twisted-Python] HTTPClientFactory's deferred never finishing download on .vcf (vcard file) link

Reza Lotun rlotun at gmail.com
Sat Oct 10 07:34:40 EDT 2009


On Sat, Oct 10, 2009 at 6:34 AM, Steve Steiner
<listsin at integrateddevcorp.com> wrote:
>        http://python.net/crew/mwh/apidocs/twisted.web.http.Request.html
> Good Lord, no wonder I'm confused.
> Half PEP-8, http://www.python.org/dev/peps/pep-0008/, half JavaRama.

I'm not quite sure what you mean. Are you talking about web.client or
web.server? If you're writing an HTTP server in Twisted you deal with
Request objects - client requests use HTTPClientFactory. There is a
new twisted.web client implementation in the works which will
hopefully be ready for trunk in the near future, and which should
provide nearly the same functionality offered by urllib2 (or more).

> I finally figured out that it was a stupid string formatting bug in the code
> that was being echoed by Twisted but swallowed by the "Grand Catcher of all
> Things Exception" in Twisted..
> Once I found and fixed that, everything works fine -- until the next time.

Exceptions shouldn't be swallowed by twisted. If you simply attach
errBacks then you'll get the exception and full traceback. It really
isn't that bad at all - I thought it looked crazy when I first
started, but all the information is there to debug, etc.

> Thanks for your help.

No problem.


Reza Lotun
mobile: +44 (0)7521 310 763
email:  rlotun at gmail.com
work:   reza at tweetdeck.com
twitter: @rlotun

More information about the Twisted-Python mailing list