Pyparsing 解析异常
我尝试插入以下 SPARQL 查询:
sparql_3 = "INSERT {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Allergies "+ repr(final_data) + "} 哪里 {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth ?predicate ?object .}"
Final_data 是一个字符串变量,表示一个加密的数据。
查询的打印是:
sparql_3 :: INSERT {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Allergies '}c£\x0bÆpì\x9b]UÖIú\x86_ \x0f7Ò$K5eÅÔ4#\x8a3\x8fÏYï\x02ñTää\x15\x00°±ÐF!-'} 其中 {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth ?predicate ?object .}
我试图运行
qres_3 = g.update(sparql_3 )
我收到以下错误:
pyparsing.ParseException:预期文本结束,找到“I”(在字符0处), (行:1,列:1)
有人可以帮忙吗?
I am tring to insert the following SPARQL query:
sparql_3 = "INSERT {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Allergies "+ repr(final_data) + "} WHERE {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth ?predicate ?object .}"
final_data is a string variable that represents an encrypted data.
The print of the query is :
sparql_3 :: INSERT {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Allergies '}c£¨\x0bÆpì\x9b]UÖIú\x86_ \x0f7Ò¼$K5eÅÔ4#\x8a3\x8fÏYï\x02ñTÂä\x15\x00°±ÐF!-'} WHERE {http://www.semanticweb.org/umbcknacc/ontologies/2017/10/untitled-ontology-3#Elizabeth ?predicate ?object .}
I was trying to run
qres_3 = g.update(sparql_3)
I get the following error:
pyparsing.ParseException: Expected end of text, found 'I' (at char 0), (line:1, col:1)
Can someone please help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论