reddit-save
reddit-save copied to clipboard
UnicodeDecodeError: 'charmap' codec can't decode byte
Trying to run the script (py save.py upvoted target/folder
) on Win10, python 3.10, getting this error:
Traceback (most recent call last):
File "C:\Users\user\Documents\reddit-save\save.py", line 46, in <module>
current_html = f.read()
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 12990: character maps to <undefined>
It's odd, because it worked fine the last time I tried running this script. Tried pip install again, no difference. I do have multiple logindata files, but only one's named logindata.py
so I don't think that's the issue (and it was running fine a week or so ago with the multiple logindata files in the directory).
I think it just needs UTF-8 specified explicitly - does the newest version resolve the issue?
Yeah seems to have done; thanks for the quick fix!