UTF-8 encoding errors in python scripts

Ran a python script, but it spat out UTF-8 encoding errors:

UnicodeEncodeError: 'charmap' codec can't encode character '\u26f0' in position 62: character maps to <undefined>

Run this snippet before the python script to manually override the encoding configuration:

chcp 65001 & set PYTHONIOENCODING=utf-8

Related