Skip to main content

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d

This page explains How to Fix UnicodeDecodeError: charmap codec can't decode byte 0x9d in position X: character maps to undefined

This issue is environmental and might occur during package installation (via PIP) or simply at runtime when files are loaded and processed by Python.

A fix that worked for a Windows OS with Python 3.9 was to force in the environment the UTF8 encoding:

$ set PYTHONUTF8=1 # For Windows CMD

✅ Resources​