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 when loading spacy

See original GitHub issue

Whether I use:

from spacy.en import English
nlp = English()

or


import spacy
nlp = spacy.load('en')

I get the error:

nlp = spacy.load('en')
return cls(path=path, **overrides)
if 'vocab' not in overrides \
lemmatizer = cls.create_lemmatizer(nlp)
return Lemmatizer.load(nlp.path)
rules = json.load(file_)
return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: ‘charmap’ codec can’t decode byte 0x9d in position 565: character maps to <undefined>

Could this be an issue with the encoding since python 2.7 handles encoding differently than 3.x? Although if I recall well, I used spacy on python 2.7 without any issues before.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
honnibalcommented, Oct 20, 2016

The fixed version is 1.0.4 — I think you nipped in just ahead of the upload. Try now.

0reactions
lock[bot]commented, May 9, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 ...
I am getting an error from nlp below: Any help would be very much appreciated. # -*- coding: utf-8 -*- import spacy nlp...
Read more >
UnicodeEncodeError during training - solved
No, in spaCy v2, the pipeline components are independent and can be trained separately. So whether the pipeline has a tagger or not...
Read more >
UnicodeDecodeError encounted when load the spacy model
Yesterday , I tried to install the latest model ' en_core_web_sm 2.0.0-alpha ' but failed. Then I found I couldn't load the models...
Read more >
What's New in v2.0 · spaCy Usage Documentation
We're very excited to finally introduce spaCy v2.0! On this page, you'll find a summary of the new features, information on the backwards...
Read more >
explosion/spaCy
Hello All, I´ve just trained a model and its giving me the following error when trying to load it from disk: UnicodeDecodeError: 'utf-8'...
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