Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pickle file load error #299

Closed
JimmyMcNullty opened this issue Mar 18, 2016 · 4 comments
Closed

Pickle file load error #299

JimmyMcNullty opened this issue Mar 18, 2016 · 4 comments

Comments

@JimmyMcNullty
Copy link

Model files for deps, ner, and pos are giving invalid load key or EOF error when I try to load them using pickle. I have run it on windows and linux systems. I don't think it is a binary mode transfer issue. I have checked it in detail. I am not able to figure out the issue.

@syllog1sm
Copy link
Contributor

I think there might be some misunderstanding here. What code are you trying to execute?

If you're trying to do something like

with open('pos/model') as file_:
    deps_model = pickle.load(file_)

then no, that won't work. That's not a pickle file, it's an internally defined binary data file, with a custom data format. It's read by the .load() method of the relevant class.

@JimmyMcNullty
Copy link
Author

Can you post the code of the load method? It is not working.

@syllog1sm
Copy link
Contributor

Code to do what?

import spacy.en
nlp = spacy.en.English()

will load the models.

@lock
Copy link

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants