SyntaxFix
Write A Post
Hire A Developer
Questions
I think it has to do with your second element in storbinary. You are trying to open file, but it is already a pointer to the file you opened in line file = open(local_path,'rb'). So, try to use ftp.storbinary("STOR " + i, file).
storbinary
file
file = open(local_path,'rb')
ftp.storbinary("STOR " + i, file)