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

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -