Your line numbers don't seem to match my plain twisted 2.4.0's...but the problem seems to occur on either of the last two lines of generatePortCommand in twisted.protocols.ftp factory = FTPDataPortFactory() factory.protocol = portCmd.protocol listener = reactor.listenTCP(0, factory) factory.port = listener # Ensure we close the listening port if something goes wrong def listenerFail(error, listener=listener): if listener.connected: listener.loseConnection() return error portCmd.fail = listenerFail # Construct crufty FTP magic numbers that represent host & port host = self.transport.getHost().host <<<< port = listener.getHost().port <<<<< Maybe either your control connection is not opened correctly (or already closed again), tcp.Port.socket only exists when the Port is actually connected.... Or, maybe your client data port couldn't be opened properly (possibly no more available ports?).... On Mon, 2006-07-10 at 16:43 +0200, Michele Petrazzo wrote:
Sometime I receive a strange error:
File "hylaproto_t.pyo", line 209, in _RetrStatus File "twisted\protocols\ftp.pyo", line 2190, in list File "twisted\protocols\ftp.pyo", line 2006, in receiveFromConnection File "twisted\protocols\ftp.pyo", line 2081, in _openDataConnection File "twisted\protocols\ftp.pyo", line 1838, in queueCommand File "twisted\protocols\ftp.pyo", line 1819, in sendNextCommand File "twisted\protocols\ftp.pyo", line 2128, in generatePortCommand File "twisted\internet\tcp.pyo", line 591, in getHost AttributeError: 'Client' object has no attribute 'socket'
At line 209 in hylaproto_t, I have: self._myClient.list('status', proto)
self._myClient are an FTPClient instance.
What can be the problem?
Thanks, Michele
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python