title: Python paramiko socket.gaierror: [Errno 11001] getaddrinfo failed
body: <p>I have the code below which results in:</p>
  
  <pre><code> File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\socket.py", line 745, in getaddrinfo
      for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
  socket.gaierror: [Errno 11001] getaddrinfo failed
  </code></pre>
  
  <p>The code is: </p>
  
  <pre><code> import sys
      sys.path.append 
      ('C:/Users/xxxxx/source/packages')
      import paramiko
      import sys
      host = "sftp://sftp.xxxxx.com"
      port = 22
      transport = paramiko.Transport((host, port))
      password = "xxxx"
      username = "xxxxx"
      transport.connect(username,password)
      sftp = paramiko.SFTPClient.from_transport(transport)
      filepath = 'C:/Python36'
      localpath = '/'
      sftp.get(filepath, localpath)
  </code></pre>
  
  <p>The error line:</p>
  
  <pre><code>if type(sock) is tuple: # connect to the given (host, port) hostname, port = sock self.hostname = hostname reason = 'No suitable address family' addrinfos = socket.getaddrinfo( hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM
  </code></pre>
  
  <p>And the first error message is:</p>
  
  <pre><code> line 317, in init hostname, port, socket.AF_UNSPEC, socket.SOCK_STREAM
  </code></pre>
  
  <p>Moreover, I have no idea on which path should I set (I have only sftp, username, password and port and that's enough for Mozilla)</p>