title: string argument expected, got 'bytes' in buffer.write
body: <p>I have this:</p>
  
  <pre><code>from io import StringIO
  buffer = StringIO()
  
  latest_file = 'C:\\Users\\miguel.santos\\Desktop\\meo_snapshots\\Snapshot_14.jpg'
  
  buffer.write(open(latest_file,'rb').read())
  
  TypeError: string argument expected, got 'bytes'
  </code></pre>
  
  <p>Any ideas on how to solve?</p>