Is ftp.storbinary not the same as ftp.retrbinary? <p>I am trying to download and upload to an FTP server. The download works just fine, but the upload is spitting out this error:</p> <p>Error: AttributeError("'function' object has no attribute 'read'",)</p> <pre><code>def download_handle(block): global sizeWritten dFile.write(block) os.system('CLS') sizeWritten += len(block) percentComplete = sizeWritten / totalSize percentComplete = round((percentComplete*100),1) print (percentComplete, "% complete") try: dFile = open('filename', "wb") print("DL File opened") ftp.retrbinary("RETR " + filename, download_handle) print("Download Completed") dFile.close() except Exception as e: print("Error:", repr(e)) def upload_handle(block): global sizeWritten upFile.write(block) os.system('CLS') percentComplete = sizeWritten / totalSize percentComplete = round((percentComplete*100),1) print (percentComplete, "% complete") try: upFile = open('filename', "rb") print("UL File opened") ftp.storbinary("STOR " + filename, upload_handle) print ("Upload completed") upFile.close() except Exception as e: print("Error:", repr(e)) </code></pre>