import ftplib
def ftp_upload(filename):
ftp = ftplib.FTP('**.**.xdomain.ne.jp')#Put the FTP host in **
ftp.set_pasv('true')
ftp.login('**.**.xdomain.jp','Please enter your password')#Please enter your account name in **
ftp.cwd('/')
f = open(filename,'rb')
ftp.storbinary('STOR /' + filename, f)
f.close()
ftp_upload('a.wav')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 6-17: ordinal not in range(256)
import ftplib
def ftp_upload(filename):
ftp = ftplib.FTP('**.**.xdomain.ne.jp')#Put the FTP host in **
ftp.set_pasv('true')
ftp.login('**.**.xdomain.jp','zvjv8pc8')#Please enter your account name in **
ftp.cwd('/')
f = open(filename,'rb')
ftp.storbinary('STOR /' + filename, f)
f.close()
ftp_upload('Ah.wav')
Do not put Japanese in the file name
import ftplib
filename = "a.wav"#A on the server.wav file
ftp = ftplib.FTP('**.**.xdomain.ne.jp')
ftp.login('**.**.xdomain.jp','Please enter your password')
ftp.cwd('/')
ftp.retrbinary("RETR " + "a.wav" ,open("local.wav", "wb").write)#A on the server.wav file local.Save as wav
ftp.quit()