Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markov.py need to change file read encoding to utf8 - among other issues #94

Open
TC-Wheel opened this issue May 4, 2022 · 0 comments

Comments

@TC-Wheel
Copy link

TC-Wheel commented May 4, 2022

I'm getting the following error in Markov.py:
File "C:\Users\tyson\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 0x9d in position 7158: character maps to
I fixed it (or broke it more?) by using a context manager and encoding as utf8.

This is now the output:
t h a d b e l i n g s o . W o o d y c o m u s t o t s u r c e . H e c a n c e a n t h a r r y w i t g i p p e n i t y . ” B u t f i r f r o o b e i g e n t e t h a t s t o c o u t - - e n j u d d a r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant