Answer the question
In order to leave comments, you need to log in
Python FTP can't connect how to solve?
And so I try to connect to my host via FTP, the programs all work with my host, but I need to go to the hosting via FTP
from ftplib import FTP
ftp = FTP()
connect = ftp.connect(HOST, IP)
login = ftp.login(USER, PASS)
print(connect)
print(login)
data = ftp.retrlines('LIST')
print(data)
Answer the question
In order to leave comments, you need to log in
And so the problem was on the host side, after 4 hours of waiting I got the answer, "Restart hosting, should help", and in the end yes it helped, thanks to everyone who tried to help!
You have: connect = ftp.connect(HOST, IP )
In the docks: FTP.connect(host='', port =0, timeout=None, source_address=None)
Is this a typo, or is there such a mistake in the code?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question