1

This was fine yesterday when I got it working.

    from ftplib import FTP

ftp = FTP('files.000webhost.com')
ftp.login(user='', passwd='')
ftp.cwd('/public_html')


def homeDrop():
    filename = 'iframe.html'
    ftp.storbinary('STOR ' + filename, open(filename, 'rb'))
    ftp.rename(filename, "home.html")
    ftp.quit()


homeDrop()

Hypothesis: it might just be the ftp server being slow thats causing this issue because that is the only dynamic variable. There is no other apparent errors.

Joe
  • 21
  • 2
  • Possible duplicate of [Getting EOFError along with exceptions when using ftplib](https://stackoverflow.com/questions/6818091/getting-eoferror-along-with-exceptions-when-using-ftplib) – stacksonstacks Nov 23 '17 at 00:56
  • Where do you get the error? What is the callstack? Show us a [log file](https://docs.python.org/3/library/ftplib.html#ftplib.FTP.set_debuglevel). Can you upload the file using a standalone FTP client running on the same machine as your Python code? Show us its log file. – Martin Prikryl Nov 23 '17 at 07:45

0 Answers0