I have this:
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'
Any ideas on how to solve?
rbas it gives youbytesobject, user.StringIOfor binary data (it's hard to use'r'to read a JPEG file I assume.)