question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 438: ordinal not in range(128)

See original GitHub issue

Hello, 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:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
marchezinixdcommented, Nov 5, 2018

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

0reactions
barrustcommented, Nov 5, 2018

That is great information! Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found