Problems using ftplib: Can't build data connection: Connection refused.

Steve Kirsch (stk@infoseek.com)
Fri, 25 Feb 1994 15:50:55 +0800

I can't get ftplib to work for me at all. I try the test script
mentioned at the beginning of the file:

from ftplib import FTP
ftp=FTP('corp')
ftp.login()
def handle_one_line(line):
print line
ftp.debugging=1
ftp.retrlines('LIST', handle_one_line)

I get:
*cmd* 'TYPE A'
*resp* '200 Type set to A.'
*cmd* 'PORT 198,5,208,1,129,138'
*resp* '200 PORT command successful.'
*cmd* 'LIST'
*resp* "425 Can't build data connection: Connection refused."

Has anyone already debugged this?

-steve