unpickling stack underflow
mrmiywj opened this issue · 1 comments
mrmiywj commented
Hi, recently I'm using your model for an NLP project. But it occurs some bugs.
In [2]: model = models.Word2Vec.load('cn.cbow.bin')
---------------------------------------------------------------------------
UnpicklingError Traceback (most recent call last)
<ipython-input-2-01c34d25b411> in <module>()
----> 1 model = models.Word2Vec.load('cn.cbow.bin')
/usr/local/lib/python2.7/dist-packages/gensim/models/word2vec.pyc in load(cls, *args, **kwargs)
1760 @classmethod
1761 def load(cls, *args, **kwargs):
-> 1762 model = super(Word2Vec, cls).load(*args, **kwargs)
1763 # update older models
1764 if hasattr(model, 'table'):
/usr/local/lib/python2.7/dist-packages/gensim/utils.pyc in load(cls, fname, mmap)
246 compress, subname = SaveLoad._adapt_by_suffix(fname)
247
--> 248 obj = unpickle(fname)
249 obj._load_specials(fname, mmap, compress, subname)
250 logger.info("loaded %s", fname)
/usr/local/lib/python2.7/dist-packages/gensim/utils.pyc in unpickle(fname)
910 with smart_open(fname) as f:
911 # Because of loading from S3 load can't be used (missing readline in smart_open)
--> 912 return _pickle.loads(f.read())
913
914
UnpicklingError: unpickling stack underflow
Platform:
Ubuntu 15.10/ Python2.7.9
to-shimo commented
you can refer to mikov's code like https://github.com/danielfrg/word2vec