Home > OS >  how to solved charmap' codec can't encode character '\u300b?
how to solved charmap' codec can't encode character '\u300b?

Time:03-15

I'm trying to start a script, but I have run in to a problem. [ERROR] 'charmap' codec can't encode character '\u300b' in position 11: character maps to

CodePudding user response:

Your code is printing something that is unreadable for the machine. Try changing the output encoding to "utf-8" or just use code below at the very first lines of your code:

import sys
sys.stdin.reconfigure(encoding='utf-8')
sys.stdout.reconfigure(encoding='utf-8')
  • Related