You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I installed talon using PIP on python 2.7. I'm trying to run the example but I get an error as soon as talon.init() is called. I can't figure out what parser it is colliding with - any ideas what is wrong? I didn't receive any error installing talon with pip.
Here's the code, error, and the other files I see on my system called parser.py.
import talon
from talon import quotations
talon.init()
text = """Reply
-----Original Message-----
Quote"""
reply = quotations.extract_from(text, 'text/plain')
reply = quotations.extract_from_plain(text)
Print(reply)
Error
Traceback (most recent call last):
File "test.py", line 4, in <module>
talon.init()
File "/usr/local/lib/python2.7/dist-packages/talon/__init__.py", line 7, in init
signature.initialize()
File "/usr/local/lib/python2.7/dist-packages/talon/signature/__init__.py", line 38, in initialize
EXTRACTOR_DATA)
File "/usr/local/lib/python2.7/dist-packages/talon/signature/learning/classifier.py", line 31, in load
return joblib.load(saved_classifier_filename)
File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/numpy_pickle.py", line 425, in load
obj = unpickler.load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatch[key](self)
File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/numpy_pickle.py", line 291, in load_build
array = nd_array_wrapper.read(self)
File "/usr/local/lib/python2.7/dist-packages/sklearn/externals/joblib/numpy_pickle.py", line 113, in read
mmap_mode=unpickler.mmap_mode)
File "/usr/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 394, in load
return format.read_array(fid)
File "/usr/lib/python2.7/dist-packages/numpy/lib/format.py", line 437, in read_array
shape, fortran_order, dtype = read_array_header_1_0(fp)
File "/usr/lib/python2.7/dist-packages/numpy/lib/format.py", line 334, in read_array_header_1_0
d = safe_eval(header)
File "/usr/lib/python2.7/dist-packages/numpy/lib/utils.py", line 1128, in safe_eval
ast = compiler.parse(source, mode="eval")
File "/usr/lib/python2.7/compiler/transformer.py", line 53, in parse
return Transformer().parseexpr(buf)
File "/usr/lib/python2.7/compiler/transformer.py", line 132, in parseexpr
return self.transform(parser.expr(text))
AttributeError: 'module' object has no attribute 'expr'
The text was updated successfully, but these errors were encountered:
I think I found the culprit for anyone else having this trouble. I had installed a few of the packages using PIP instead of using ubuntu's apt-get. So when I re-installed lxml like this it started working.
I installed talon using PIP on python 2.7. I'm trying to run the example but I get an error as soon as talon.init() is called. I can't figure out what parser it is colliding with - any ideas what is wrong? I didn't receive any error installing talon with pip.
Here's the code, error, and the other files I see on my system called parser.py.
Parser.py files:
Code:
Error
The text was updated successfully, but these errors were encountered: