NLPIR-team / nlpir-python

NLPIR-python A python wrapper and toolkit for NLPIR
MIT License
32 stars 13 forks source link

Error when using sentiment analysis #28

Closed DigitalSport closed 3 years ago

DigitalSport commented 3 years ago

The error info is listed below:

st=sentiment.SentimentNew() Traceback (most recent call last):

File "", line 1, in

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/sentiment.py", line 22, in init

super().__init__(encode, lib_path, data_path, license_code)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/nlpir_base.py", line 132, in init

self.lib_nlpir, self.lib_path = self.load_library(sys.platform)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/nlpir_base.py", line 224, in load_library

lib_nlpir = ctypes.cdll.LoadLibrary(lib)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 426, in LoadLibrary

return self._dlltype(name)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 348, in init

self._handle = _dlopen(self._name, mode)

OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so, 6): no suitable image found. Did find:

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x0
yangyaofei commented 3 years ago

Reproduce bug in newest version.

It's a bug from https://github.com/NLPIR-team/NLPIR, reported and will update when update of upstream.

yangyaofei commented 3 years ago

fixed