tsroten / pynlpir

A Python wrapper around the NLPIR/ICTCLAS Chinese segmentation software.
MIT License
566 stars 135 forks source link

License is out again? Replacing NLPIR.user does not work. #66

Closed ashtonteng closed 7 years ago

ashtonteng commented 7 years ago

I am using Python3 on Mac OS Sierra. I downloaded NLPIR.user from https://github.com/NLPIR-team/NLPIR/tree/master/License/license%20for%20a%20month/NLPIR-ICTCLAS%E5%88%86%E8%AF%8D%E7%B3%BB%E7%BB%9F%E6%8E%88%E6%9D%83 and replaced my local version, but this error persists.


RuntimeError Traceback (most recent call last)

in () 1 import pynlpir ----> 2 pynlpir.open() /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pynlpir/__init__.py in open(data_dir, encoding, encoding_errors, license_code) 95 96 if not nlpir.Init(data_dir, encoding_constant, license_code): ---> 97 raise RuntimeError("NLPIR function 'NLPIR_Init' failed.") 98 else: 99 logger.debug("NLPIR API initialized.") RuntimeError: NLPIR function 'NLPIR_Init' failed.
ashtonteng commented 7 years ago

Nevermind, I just did not refresh my Jupyter notebook!

tsroten commented 7 years ago

@ashtonteng Great, I'm glad it worked out!

tsroten commented 7 years ago

@ashtonteng If you update via pip install --upgrade pynlpir to the newest version, you can auto-update the license by running pynlpir update.