title: Downloading file with pysftp
body: <p>I'm trying to load (and directly save locally) a <code>.csv</code> file stored on a FTP Server (SFTP protocol). I'm using Python in combination with pysftp library. When I check if the file exists, it returns TRUE. But when trying to load the file, it seems to be empty, whatever I try.</p>
  
  <p>How can I get (and store) the file to my local environment? Do I miss something obvious?</p>
  
  <pre><code>import pysftp
  
  cnopts = pysftp.CnOpts()
  cnopts.hostkeys = None
  
  # Make connection to sFTP
  with pysftp.Connection(hostname,
                         username=sftp_username,
                         password=sftp_pw,
                         cnopts = cnopts
                         ) as sftp:
      sftp.isfile('directory/file.csv')) ## TRUE
      file = sftp.get('directory/file.csv')
      print(file) ## None
  
  sftp.close()
  </code></pre>