UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 438: ordinal not in range(128)
See original GitHub issueHello, I’m having an issue when trying to call SpellChecker in other languages. English work fine, but all the other throws the following error.
from spellchecker import SpellChecker
spell = SpellChecker('es')
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 438: ordinal not in range(128)
Any idea of what’s going on and how can i solve it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
'ascii' codec can't decode byte 0xd1 in position 2: ordinal not ...
The reason for the error being that Python is trying to automatically decode it from the default encoding, ASCII, so that it can...
Read more >UnicodeDecodeError: 'ascii' codec can't decode byte
UnicodeDecodeError : 'ascii' codec can't decode byte 0xf0 in position 0: ordinal not in range(128) with open('example.txt', 'r', encoding='ascii') as f: ...
Read more >Fix Python UnicodeEncodeError: 'ascii' codec can't encode ...
UnicodeEncodeError : 'ascii' codec can't encode character u'\u03b1' in position 20: ordinal not in range(128). Additionally, when writing pandas DataFrames ...
Read more >How To Fix Python Error - UnicodeEncodeError: 'ascii' codec ...
This is a very common error UnicodeEncodeError: 'ascii' codec can't encode ... in position ordinal not in range(128), ascii codec can't encode character...
Read more >UnicodeDecodeError utf-8 codec can t decode byte in position ...
While I importing the file it shows UnicodeDecodeError: "utf-8" codec can"t decode byte 0xa0 in position ... as pd a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem was that python3 encode and decode were set for ascii. I changed the Python3 variables, and everything worked fine. Thanks for the support. We can close this.
For anyone with the same problem: https://stackoverflow.com/questions/44344458/why-does-locale-getpreferredencoding-return-ansi-x3-4-1968-instead-of-utf-8 https://perlgeek.de/en/article/set-up-a-clean-utf8-environment
That is great information! Thanks!