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

Fix error message when loading Py3 model in Py2 #335

Open
JaimieMurdock opened this issue Jul 9, 2018 · 0 comments
Open

Fix error message when loading Py3 model in Py2 #335

JaimieMurdock opened this issue Jul 9, 2018 · 0 comments
Milestone

Comments

@JaimieMurdock
Copy link
Member

Add a catch for this error which will occur when Python 3 models are attempted to be loaded into Python 2.

pujianguaideAir:Desktop pjhuai$ topicexplorer launch /Users/pjhuai/Desktop/Analects-20.ini 
using default label function
using default id function
Traceback (most recent call last):
  File "/Users/pjhuai/anaconda/bin/topicexplorer", line 11, in <module>
    load_entry_point('topicexplorer', 'console_scripts', 'topicexplorer')()
  File "/Users/pjhuai/inpho/topicexplorer/topicexplorer/__main__.py", line 242, in main
    app = benchmark(server.create_app)(args)
  File "/Users/pjhuai/inpho/topicexplorer/topicexplorer/server.py", line 674, in create_app
    home_link=home_link)
  File "/Users/pjhuai/inpho/topicexplorer/topicexplorer/server.py", line 89, in __init__
    self._load_corpus(corpus_file)
  File "/Users/pjhuai/inpho/topicexplorer/topicexplorer/server.py", line 120, in _load_corpus
    self.c = Corpus.load(corpus_file)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/vsm/corpus/base.py", line 623, in load
    return Corpus._parallel_load(file)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/vsm/zipfile.py", line 29, in wrapper
    value = f(*args, **kwargs)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/vsm/corpus/base.py", line 664, in _parallel_load
    c.context_data = [future.result() for future in c.context_data]
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/concurrent/futures/_base.py", line 422, in result
    return self.__get_result()
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/concurrent/futures/thread.py", line 62, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/vsm/corpus/base.py", line 35, in load_npz
    return zipfile.__getitem__(obj)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/numpy/lib/npyio.py", line 233, in __getitem__
    pickle_kwargs=self.pickle_kwargs)
  File "/Users/pjhuai/anaconda/lib/python2.7/site-packages/numpy/lib/format.py", line 640, in read_array
    array = pickle.load(fp, **pickle_kwargs)
ValueError: non-string names in Numpy dtype unpickling
@JaimieMurdock JaimieMurdock added this to the 1.0 Release milestone Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant