Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
30.56k
stars
2.27k
forks
source link
UnicodeDecodeError: 'gbk' codec can't decode byte 0x93 in position 822129: illegal multibyte sequence #8426
Closed
Col0ring closed 3 weeks ago
Describe the bug
This error is caused by the following code when using custom components with i18n code on Windows (the default encoding is 'gkb').
gradio/routes.py
To fix it, change
Path(path).read_text().encode()
toPath(path).read_text(encoding="utf-8").encode()
.Suggestion: the default encoding of Windows in some regions is not 'utf-8', it's better to always add the
encoding
parameter when reading files.Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
Severity
Blocking usage of gradio