I have a program which sends a text file to a ftp server. The code is:
def sendBug():
session = ftplib.FTP('ftp://xxxx.xxxx.xxxx.xxxx', " ", " ")
bugfile = open(bugreport.txt, "r")
session.storlines("STOR bugreport.txt", bugfile)
bugfile.close()
session.quit()
However, when I run that script, I'm getting something like this:
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1470, in __call__
return self.func(*args)
File "C:\Users\Nitro\Desktop\py2exe stuff\school firewall ui.py", line 46, in getnews
ftp= ftplib.FTP(server)
File "C:\Python27\lib\ftplib.py", line 120, in __init__
self.connect(host)
File "C:\Python27\lib\ftplib.py", line 135, in connect
self.sock = socket.create_connection((self.host, self.port), self.timeout)
File "C:\Python27\lib\socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno 11004] getaddrinfo failed
any way to fix this? Im hosting a ftp server with IIS. And school firewall ui is my program.