when using ftplib in python -
here relevant code that's causing error.
ftp = ftplib.ftp('server') ftp.login(r'user', r'pass') #change directories "incoming" folder ftp.cwd('incoming') fileobj = open(fromdirectory + os.sep + f, 'rb') #push file try: msg = ftp.storbinary('stor %s' % f, fileobj) except exception inst: msg = inst finally: fileobj.close() if '226' not in msg: #handle error case
i've never seen error before , information why might getting useful , appreciated.
complete error message: [errno 10060] connection attempt failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond
it should noted when manually (i.e. open dos-prompt , push files using ftp commands) push file same machine script on, have no problems.
maybe should increase "timeout" option, , let server more time response.
Comments
Post a Comment