File upload via FTP gaieerror Python 2.6 -
i'm trying upload text file ftp server, getting error:
gaierror: [errno 11004] getaddrinfo failed
here code.
s = ftplib.ftp("ftp://xbrera.co.cc", "myuser", "mypass") f = open(path + "ld.txt", "r") s.storbinary("stor " + path + "ld.txt") f.close() s.quit()
what doing wrong, , why getting error? thanks!
change code s = ftplib.ftp("xbrera.co.cc", "myuser", "mypass")
. ftp://
mandatory uri ftplib library expect hostname of ftp server.
Comments
Post a Comment