Why would the file not be completely downloaded? I have checked the temp file and it is also cut off. when i try to extract the file i receive a unexpected end of archive crc failed the file is corrupt error.
I honestly don’t know - I’m not very familiar with Python’s FTP lib. Do you get any errors on the console? Perhaps you’re not closing the file stream to the temp file, and not all the bytes are being flushed out to the file?
I am facing the same problem if you guys can help me out.
File on machine is getting created but not showing any data.
Have Test.txt file on server and want to copy the content of it to new file on machine.
Following is the code.
def getTestFile():
import os
import system
from ftplib import FTP