You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spacy fails to deserialize empty document from binary format #459
Spacy throws the following exception when deserializaing an empty document from binary format:
SystemError Traceback (most recent call last)
in ()
5 b = empty_doc.to_bytes()
6 d = Doc(english.vocab)
----> 7 d.from_bytes(b)
/home/boris/work/happ/customers/ubs/venv/lib/python3.5/site-packages/spacy/tokens/doc.pyx in spacy.tokens.doc.Doc.from_bytes (spacy/tokens/doc.cpp:10859)()
SystemError: <built-in method unpack_into of spacy.serialize.packer.Packer object at 0x7f0ea30af638> returned NULL without setting an error
Can be reproduced on spacy 0.101.0 using the following code:
import spacy
from spacy.tokens import Doc
english = spacy.en.English()
empty_doc = english("")
b = empty_doc.to_bytes()
d = Doc(english.vocab)
d.from_bytes(b)
Activity
Test Issue #459: Fail to deserialize empty doc
Fix Issue #459 -- failed to deserialize empty doc.
honnibal commentedon Oct 23, 2016
Fixed, thanks!
lock commentedon 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.