AssertionError:错误:对stanford的调用已退出,代码状态为非零

2024-09-29 23:26:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用philipperemy在这里创建的stanfordopenie的python包装器:https://github.com/philipperemy/Stanford-OpenIE-Python。但是,我使用的是窗口系统,因此我使用Cygwin运行以下代码:

git clone https://github.com/philipperemy/Stanford-OpenIE-Python.git
cd Stanford-OpenIE-Python
echo "Barack Obama was born in Hawaii." > samples.txt
python main.py -f samples.txt

但是,我遇到了这样的错误

^{pr2}$

我不知道怎么修理它。我使用了java版本的1.8.0_121,并使用$ git pull origin master检查是否使用了此Github文件的更新版本。在

有人知道怎么解决这个问题吗?在

提前谢谢!在

更具体地说,以下是完整的错误消息:

$ python main.py -f samples.txt
Namespace(filename='samples.txt', generate_graph=False, verbose=False)
Traceback (most recent call last):
File "main.py", line 147, in <module>
exit(main(argv))
File "main.py", line 142, in main
entities_relations = stanford_ie(filename, verbose, generate_graphviz)
File "main.py", line 118, in stanford_ie
assert not java_process.returncode, 'ERROR: Call to stanford_ie exited with a non-zero code status.'
AssertionError: ERROR: Call to stanford_ie exited with a non-zero code status.

Tags: inpyhttpsgitgithubtxtmainline

热门问题