[Twisted-Python] twisted.internet.error.ConnectionLost

Andrew Bennetts andrew-twisted at puzzling.org
Wed Aug 31 21:01:54 EDT 2005

On Wed, Aug 31, 2005 at 05:19:27PM +0200, Daniel Isenegger wrote:
> Hi
> in an instance of protocol.basic.lineOnlyReceiver i i read in a file in 
> a string and try to send this string to another instance of 
> protocol.basic.lineOnlyReceiver trough the normal 
> self.transport.write(theString + "\r\n")

(You may find twisted.protocol.basic.FileSender helpful for this case)

> when doing this i get the error message:
> IK_IC_TSS 16:13:53:03  connectionLost() for the instance IK_IC_TSS due 
> to reason: [Failure instance: Traceback (failure with no frames): 
> twisted.internet.error.ConnectionLost: Connection to the other side was 
> lost in a non-clean fashion.
> The file is a normal text file of about 200KB.
> I googled for similar types of errors, but could not find smth.
> Is there an explicit string size limit or is it just the fact the the 
> lineOnlyReceiver is not built for that kind of data transfer?

There is -- see the MAX_LENGTH attribute of LineOnlyReceiver.  As the
docstring says:

    @cvar MAX_LENGTH: The maximum length of a line to allow (If a
                      sent line is longer than this, the connection is dropped).
                      Default is 16384.


More information about the Twisted-Python mailing list