SSLEOFError on FTPS using Python ftplib -
i'm connecting ftp site using ftps (explicit). connecting , basic commands work fine, yet when try retrieve directory listing or file ssleoferror.
from ftplib import ftp_tls ftps = ftp_tls() ftps.auth() ftps.prot_p() ftps.login(username, password) ftps.cwd('/') ftps.retrlines('list') ftps.quit() everything 'list' command executes without problems. 'list' command reply:
'150 opening data channel directory listing of "/" and error:
ssleoferror: eof occurred in violation of protocol (_ssl.c:645) i've tried setting tlsv1 explicitly - no avail. using ftp client can connect ftp site without problems. doing wrong in code? i've tried both python 3.5 , 2.7.
turns out problem ftp server connecting requires session resumption, isn't supported in python 3.5 , 2.7. functionality has been added in 3.6.
Comments
Post a Comment