AssertionError: Please install CoreNLP by running `stanza.install_corenlp()`. If you have installed it, please define $CORENLP_HOME to be location of your CoreNLP distribution or pass in a classpath parameter.
JueXiuHuang opened this issue · 3 comments
I follow the installation guide and try to run Step-by-step extraction, but it keeps give below error:
Traceback (most recent call last):
File "ASER.py", line 8, in
aser_extractor = DiscourseASERExtractor(
File "/workspace/ASER/aser/extract/aser_extractor.py", line 775, in init
super().init(corenlp_path, corenlp_port, **kw)
File "/workspace/ASER/aser/extract/aser_extractor.py", line 29, in init
_, self.is_externel_corenlp = get_corenlp_client(corenlp_path=self.corenlp_path, corenlp_port=self.cor enlp_port)
File "/workspace/ASER/aser/extract/utils.py", line 107, in get_corenlp_client
corenlp_client = CoreNLPClient(
File "/opt/conda/lib/python3.8/site-packages/stanza/server/client.py", line 306, in init
classpath = resolve_classpath(classpath)
File "/opt/conda/lib/python3.8/site-packages/stanza/server/client.py", line 241, in resolve_classpath
raise FileNotFoundError("Please install CoreNLP by runningstanza.install_corenlp()
. If you have ins talled it, please define "
FileNotFoundError: Please install CoreNLP by runningstanza.install_corenlp()
. If you have installed it, please define $CORENLP_HOME to be location of your CoreNLP distribution or pass in a classpath parameter. $CORENLP_HOME=/home/widm/Joshua/ASER/stanford-corenlp-3.9.2/
Exception ignored in: <function BaseASERExtractor.del at 0x7f01705258b0>
Traceback (most recent call last):
File "/workspace/ASER/aser/extract/aser_extractor.py", line 47, in del
self.close()
File "/workspace/ASER/aser/extract/aser_extractor.py", line 38, in close
if not self.is_externel_corenlp:
AttributeError: 'DiscourseASERExtractor' object has no attribute 'is_externel_corenlp'
I have try to run corenlp manually, and corenlp server start successfully.
We recommend users download and run the corenlp server manually.
@JueXiuHuang
if you are using jupyter notebooks, run following
import os
os.environ["CORENLP_HOME"] = r'/<path-to>/ASER-master/stanford-corenlp-3.9.2'
or if you are executing from terminal, run following
export CORENLP_HOME=/<path-to>/ASER/stanford-corenlp-3.9.2/