Skip to content

Commit 259f7c3

Browse files
committed
HOW To FIX - UnicodeDecodeError in Python
1 parent 63a1f61 commit 259f7c3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
description: >-
3+
This page explains How to Fix UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position X: character maps to <undefined>
4+
---
5+
6+
# UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d
7+
8+
<SubHeading>This page explains How to Fix UnicodeDecodeError: charmap codec can't decode byte 0x9d in position X: character maps to undefined</SubHeading>
9+
10+
This issue is environmental and might occur during package installation (via PIP) or simply at runtime when files are loaded and processed by Python.
11+
12+
A fix that worked for a Windows OS with Python 3.9 was to force in the environment the UTF8 encoding:
13+
14+
```bash
15+
$ set PYTHONUTF8=1 # For Windows CMD
16+
```
17+
18+

0 commit comments

Comments
 (0)