请在下面找到查询,406
当我尝试查询 sparql 端点时会出错。我不确定为什么。谁能帮我解决这个问题?提前致谢。
from SPARQLWrapper import SPARQLWrapper, JSON, POST, DIGEST
import json
sparql = SPARQLWrapper("http://losd.staging.derilinx.com:8890/")
sparql.setCredentials("*******", "********")
query = """
prefix concpt: <http://ld.linked-open-statistics.org/data/conceptscheme/>
prefix vocb: <http://ld.linked-open-statistics.org/vocab/>
prefix data: <http://ld.linked-open-statistics.org/data/>
select * where {
?s ?p ?o .
}
"""
sparql.addDefaultGraph("http://unemp_rate.italy..staging.derilinx.com")
sparql.setHTTPAuth(DIGEST)
sparql.setQuery(query)
sparql.setReturnFormat(JSON)
results = sparql.query().convert()
错误:
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 406: Unacceptable