I've searched how to upload a csv file by ftp using Python. I tried this code:
from ftplib import FTP
ftp = FTP("host")
ftp.login("user","password")
Output_Directory = "//ftp//data//"
File2Send="C://Test//test.csv"
file = open(File2Send, "rb")
ftp.cwd(Output_Directory)
ftp.storbinary('STOR ' + File2Send, file)
and that's what I got as an error. I think I couldn't write ftp.storbinary function correctly. Can anyone tell me how to make it correct please?
Thank you