AttributeError: module 'msgpack._unpacker' has no attribute 'unpack'

I’m getting the following error after having installed prodigy, downloaded the news_headline jsonl file and created a dataset on a mysql server.

I’m running the following command
$ prodigy ner.teach my_set en_core_web_sm /home/ronnie/news_headlines.jsonl

I’m running on Ubuntu 16.04.3 LTS

Any help is much appreciated.


Sorry about that – this error is related to the msgpack dependency in spaCy and started occurring this morning when a new msgpack version was released. You can find more details on this on the spaCy issue tracker. For now, a simple fix is to downgrade msgpack-python:

pip uninstall msgpack
pip install msgpack-python==0.5.4

We’re just waiting for the tests to go green, then we’ll release a new spaCy version that resolves this problem.

1 Like

Just released spaCy v2.0.9 which includes the explicit version pin, and prevents the library from installing the latest update of msgpack-python that caused this problem. You should be able to simply upgrade spaCy in your Prodigy environment:

pip install -U spacy

Prodigy v1.3.0 is pinned to spacy>=2.0.8,<2.1.0, so it should now install v2.0.9 by default.

(This was a nice reminder to always pin dependencies, and always use explicit pins for versions < 1.0 that don’t ensure backwards compatibility.)

1 Like

That took care of everything.

Thank you for such a quick reply. I really appreciate it.

1 Like