문제

Recently I have been interested in FTP servers and I was wondering how to get a python script to download and upload files onto a FTP server I have set up. But I can't seem to get it to work. Every time I typ in this like of code:

ftp = FTP_TLS("ftp.10.0.1.14")

It gives me an error, sorry if it's a stupid question but all my research on the subject say that we're you put the server's adress.

Thanks!

도움이 되었습니까?

해결책

Remove that "ftp." from the beginning of the address you have - it is not part of the IP address. Also, make sure you are importing FTP_TLS:

from ftplib import FTP_TLS
ftp = FTP_TLS("10.0.1.14")

As a side note, when you are getting an error it is a good idea to include the exact error you are getting in your question.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top