[Twisted-Python] how to write a safe catch-all

Chris Withers chris at simplistix.co.uk
Fri Oct 1 09:30:48 EDT 2010

Hi Glyph,

On 30/09/2010 19:52, Glyph Lefkowitz wrote:
>> File "Twisted-8.2.0-py2.5-linux-x86_64.egg/twisted/internet/base.py",
>> line 757, in runUntilCurrent
>> call.func(*call.args, **call.kw)
>> File "test_looping.py", line 24, in __call__
>> del self.connector
>> exceptions.AttributeError: Break instance has no attribute 'connector'
> This traceback indicates a bug in Twisted.
> This is an error that other people have very occasionally spotted, and
> we have never been able to reliably reproduce it.

While I'm able to reproduce this, I can't really as it involves a 
customer ftp server also generating error messages and they've already 
had enough of them ;-)

> Over the years we have
> tried to diagnose it in various ways and we have always failed.
> It would be really valuable to everyone if you could write up a bug and

Is there a bug already tracking this?

> provide detailed reproduction instructions, ideally with some python
> code that triggers this error, so that we can address the bug. It would
> be super useful if you could write an example that reproduces the same
> bug on a recent Twisted version (8.2 is pretty old), especially the 10.2
> prerelease. But, if your example reproduces on 8.2 and not 10.0, that
> tells us something too.

Well, unfortunately I can't do any of the above :-( I've only seen this, 
as I said previously, when we use twisted.protocols.ftp.FTPClient to try 
to send a file to an ftp server that was only able to handle active ftp 
transfers when our setup only allowed passive ftp transfers.

It was happening in a steady, reproducible fashion (ie: every time we 
tried) but unfortunately we've had to bail and now send via sftp using a 
pexpect-based wrapper around the real sftp command client (we had buggy 
behaviour with twisted's sftp client elsewhere)

I hope this helps, do let me know if I should add it to an issue 



More information about the Twisted-Python mailing list