我的 Centos 服务器上有 pyftpdlib 0.7.0,当我尝试运行此命令时,我在客户端上使用 ftplib 我收到此错误
客户端操作系统:Windows 7
python V:2.7
服务器操作系统:CentOs
我的鳕鱼:
from ftplib import FTP
ftp = FTP('xxx.xxx.xxx.xxx')
ftp.login(user='xxx', passwd='xxx' )
ls = []
ftp.retrlines('RETR 2.jpg', callback =ls.append)
print ls
和错误:
Traceback (most recent call last):
File "E:\py\ftp test\ftpTest.py", line 7, in <module>
ftp.retrlines('RETR 2.jpg', callback =ls.append)
File "C:\Python27\lib\ftplib.py", line 422, in retrlines
conn = self.transfercmd(cmd)
File "C:\Python27\lib\ftplib.py", line 361, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "C:\Python27\lib\ftplib.py", line 330, in ntransfercmd
resp = self.sendcmd(cmd)
File "C:\Python27\lib\ftplib.py", line 244, in sendcmd
return self.getresp()
File "C:\Python27\lib\ftplib.py", line 220, in getresp
raise error_proto, resp
error_proto: