login into local FTP server with ip
<p>I am trying to log into a FTP server that I am only running locally in my network. To do this I have to use my ip address to use as the server address (see code below). However each time I get a <strong><em>gaierror: [Errno 11004] getaddrinfo failed</em></strong> error. </p>

<p>Can anyone look at my code and see if I am making any error that may be the cause of this address issue? Also I can log into the ftp server fine from my browser so I know the server is up and running correctly, also anonymous login to the server is allowed .</p>

<pre><code>#import the ftp lib.
from ftplib import FTP
#enter the address of the ftp server to use, use ip address since server is ran locally
ftp = FTP('ftp://192.168.1.130')
#logs into the ftp server
ftp.login()
</code></pre>
