Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问答模块无法正常使用 #46

Open
scalaKing opened this issue Mar 31, 2023 · 0 comments
Open

问答模块无法正常使用 #46

scalaKing opened this issue Mar 31, 2023 · 0 comments

Comments

@scalaKing
Copy link

scalaKing commented Mar 31, 2023

你好,我尝试使用您的问答模块跑demo,就是运行naiveKGQA.py这个Python脚本,结果直接报如下错误:
问:你好
答:你好
问:孙中山干了什么事?
Traceback (most recent call last):
File "D:\workspace\git\HarvestText\examples\naiveKGQA.py", line 165, in
print("答:"+QA.answer(question0))
File "D:\workspace\git\HarvestText\examples\naiveKGQA.py", line 110, in answer
answers = self.search_answers(search0)
File "D:\workspace\git\HarvestText\examples\naiveKGQA.py", line 99, in search_answers
records = self.KG.query(search0)
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\graph.py", line 1127, in query
result = plugin.get(result, query.Result)
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\plugin.py", line 107, in get
return p.getClass()
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\plugin.py", line 69, in getClass
module = import(self.module_path, globals(), locals(), [""])
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\plugins\sparql_init_.py", line 33, in
from . import parser
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\plugins\sparql\parser.py", line 184, in
Param('prefix', PN_PREFIX)) + Suppress(':').leaveWhitespace()
File "D:\ProgramData\anaconda3\envs\kg_env\lib\site-packages\rdflib\plugins\sparql\parserutils.py", line 114, in init
self.name = name
AttributeError: can't set attribute

操作系统:Win10 专业版

python版本:3.6.13

HarvestText版本:0.8.1.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant