Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top