title: Why can I not use Python to connect to my FTP server?
body: <p>Why can I not connect to my FTP? When I specify a port I receive error &quot;socket.gaierror: [Errno -2] name of service not known&quot;, and when I don't specify my port I receive [errno 111] Connection refused.
  What am I doing wrong?</p>
  <pre><code>from ftplib import FTP
  from pathlib import Path
  
  file_path = ('TEST.txt')
  
  with FTP('url:port', 'user', 'pass') as ftp, 
  open(file_path, 'rb') as file:
  ftp.storbinary(f'STOR {file_path.name}', file)
  </code></pre>