sending = ftp.storlines('STOR '+ namefilemass[count], sendFTP)
File "/usr/lib/python3.5/ftplib.py", line 529, in storlines
with self.transfercmd(cmd) as conn:
File "/usr/lib/python3.5/ftplib.py", line 398, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib/python3.5/ftplib.py", line 364, in ntransfercmd
resp = self.sendcmd(cmd)
File "/usr/lib/python3.5/ftplib.py", line 272, in sendcmd
return self.getresp()
File "/usr/lib/python3.5/ftplib.py", line 245, in getresp
raise error_perm(resp)
ftplib.error_perm: 550 The parameter is incorrect.
сам код
presscount += 1
namefile = str(presscount)+ '#' + datetime.strftime(datetime.now(), '%d.%m.%Y %H:%M') + 'uknews.html'
namefilemass.append(namefile)
with codecs.open(namefile,'w','windows-1251') as cutfile:
cutfile.write(template.render(parse_datetime = parse_datetime, textmass=textmass[i], contentmass=contentmass[i], autormass=autormass[i]))
i += 1
#Закидываем файлы на FTP
time.sleep(5)
ftp = ftplib.FTP('', '', '')
ftp.login("", "")
#path = os.path.abspath(namefile)
count = 0
print(namefilemass[0])
while count <= len(namefilemass):
sendFTP = open(namefilemass[count],'rb')
sending = ftp.storlines('STOR '+ namefilemass[count], sendFTP)
count += 1
ftp.quit()
может знаешь что?
бляяя
заливай на pastebin а не сюда
Обсуждают сегодня