Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Getting Error "UnicodeEncodeError: 'charmap' codec can't encode characters" #38

Closed
starrock2 opened this issue Apr 23, 2022 · 3 comments

Comments

@starrock2
Copy link

Hello,

I am getting below error, the code is not stopping..

--- Logging error ---
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\logging_init_.py", line 1103, in emit
stream.write(msg + self.terminator)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 283-287: character maps to
Call stack:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 966, in _bootstrap
self._bootstrap_inner()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\engineio\client.py", line 669, in _read_loop_websocket

@hldh214
Copy link
Owner

hldh214 commented Apr 23, 2022

Please try setting environment variable before running

# Use the UTF-8 mode on Windows
export PYTHONUTF8=1

@starrock2
Copy link
Author

Working Fine now.

@hldh214 hldh214 pinned this issue Apr 25, 2022
@hldh214 hldh214 mentioned this issue Apr 29, 2022
@diego0700
Copy link

i have python on environment variable but still not working
image

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

No branches or pull requests

3 participants