docs = read_spacy_docs('corpus', format='binary', lang='en_core_web_sm')
next(docs)
Traceback (most recent call last):
File "<ipython-input-17-76336de71ac8>", line 1, in <module>
next(docs)
File "/home/judah.rand@fospha.local/anaconda3/envs/clickz/lib/python3.6/site-packages/textacy/io/spacy.py", line 93, in read_spacy_docs
text = msg["text"]
KeyError: 'text'
Possible Solution
I believe the issue is occurring because msgpack is read the dictionary keys back in as byte arrays and the code in textacy.io.spacy.read_spacy_docs() is using default strings.
Steps to Reproduce (for bugs)
Load file of Spacy Docs using textacy.io.spacy.read_spacy_docs()
Iterate over result
Context
Means I can't read my corpus back into memory with using altered version of textacy.io.spacy.read_spacy_docs()
Expected Behavior
Spacy Docs should be correctly read into memory.
Current Behavior
Possible Solution
I believe the issue is occurring because msgpack is read the dictionary keys back in as byte arrays and the code in textacy.io.spacy.read_spacy_docs() is using default strings.
Steps to Reproduce (for bugs)
Context
Means I can't read my corpus back into memory with using altered version of textacy.io.spacy.read_spacy_docs()
Your Environment