richard kappler
2015-09-11 16:00:12 UTC
I can connect via ftp, but when I try to send a file, I get a no route to
host error, I don't understand.
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/ftplib.py", line 452, in storbinary
conn = self.transfercmd(cmd)
File "/usr/lib64/python2.6/ftplib.py", line 360, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib64/python2.6/ftplib.py", line 326, in ntransfercmd
conn = socket.create_connection((host, port), self.timeout)
File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
raise error, msg
socket.error: [Errno 113] No route to host
Any ideas?
regards, Richard
host error, I don't understand.
import ftplib
from ftplib import FTP
fBOT = FTP()
oldfile = '/home/test/DataFeed/input/images/BOT/1.jpg'
newfile = 'new.jpg'
oldfile = open('/home/test/DataFeed/input/images/BOT/1.jpg', 'rb')
fBOT.connect('192.168.2.23', 2021)
'220 Service ready for new user.'from ftplib import FTP
fBOT = FTP()
oldfile = '/home/test/DataFeed/input/images/BOT/1.jpg'
newfile = 'new.jpg'
oldfile = open('/home/test/DataFeed/input/images/BOT/1.jpg', 'rb')
fBOT.connect('192.168.2.23', 2021)
fBOT.login('BOT', 'sick')
'230 User logged in, proceed.'fBOT.storbinary('STOR newfile', oldfile)
Traceback (most recent call last):File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/ftplib.py", line 452, in storbinary
conn = self.transfercmd(cmd)
File "/usr/lib64/python2.6/ftplib.py", line 360, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
File "/usr/lib64/python2.6/ftplib.py", line 326, in ntransfercmd
conn = socket.create_connection((host, port), self.timeout)
File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
raise error, msg
socket.error: [Errno 113] No route to host
Any ideas?
regards, Richard
--
All internal models of the world are approximate. ~ Sebastian Thrun
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
All internal models of the world are approximate. ~ Sebastian Thrun
_______________________________________________
Tutor maillist - ***@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor