Apr-17-2022, 09:16 PM
(Apr-17-2022, 09:01 PM)Aggie64 Wrote: I get an error on the write that the data must be str, not bytes
So it may be ascii (or utf-8) inside, but hasn't been decoded to that. In which case, you probably want to write and read it as binary.
with open("savedata", "wb") as f: f.write(content) with open("savedata", "rb") as f: content = f.read()