我正在使用SPARQLWrapper对本地主机中的 Sesame 商店进行 SPARQL 查询:
sparql = SPARQLWrapper('http://localhost:8080/openrdf-sesame/repositories/rep/statements')
sparql.setQuery(query)
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
但是,我得到:
File "build/bdist.linux-i686/egg/SPARQLWrapper/Wrapper.py", line 339, in query
File "build/bdist.linux-i686/egg/SPARQLWrapper/Wrapper.py", line 318, in _query
urllib2.HTTPError: HTTP Error 406: Not Acceptable
然而,奇怪的是,查询 DBPedia SPARQL 端点一切正常......
有什么想法吗?
谢谢!