Error Uploading A File To A Ftp Server
Solution 1:
for first Server line doen't need the "ftp://"
Basiclly gaierror: [Errno 11004] getaddrinfo failed
means that the ftp module can't understand the 'ftp://xxxx.xxxx.xxxx.xxxx'
address you gave him - host name.
gaierror
from Docs:
This exception is raised for address-related errors, for getaddrinfo() and getnameinfo(). The accompanying value is a pair (error, string) representing an error returned by a library call. string represents the description of error, as returned by the gai_strerror() C function. The error value will match one of the EAI_* constants defined in this module.
You are passing ftplib.FTP()
with host, username and password (both user and password are space at your case)
if it's supposed to be anonymous just use:
ftp = ftplib.FTP('you address')
ftp.login()
If it still doesn't work try to ping your address or try to connect some known FTP to understated where is the problem.
You can also try this link it's very useful
For more info about python FTP try the docs
Post a Comment for "Error Uploading A File To A Ftp Server"