2

Please find below query, which gives 406 error when I try to query the sparql endpoint. I am not sure why. Could anyone help me with this? Thanks in advance.

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()

Error:

raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 406: Unacceptable
TallTed
  • 9,069
  • 2
  • 22
  • 37
Swaroop
  • 109
  • 3
  • 9
  • 1
    `sparql = SPARQLWrapper("http://losd.staging.derilinx.com:8890/sparql")` – Stanislav Kralin Feb 27 '19 at 22:12
  • @StanislavKralin thanks. Worked – Swaroop Feb 27 '19 at 22:14
  • Do you have control over that endpoint? Or contact with those who do? Note that they're running an EXTREMELY old version of Virtuoso (Open Source Edition `06.01.3127`, [from circa January 2010](https://github.com/openlink/virtuoso-opensource/commit/a863d78d61704983b805a46f30ead11f7fce3740), though it was *built* in August 2018)! This should immediately be updated to a current version of Virtuoso 7.2 [stable](https://github.com/openlink/virtuoso-opensource/tree/stable/7) or [develop](https://github.com/openlink/virtuoso-opensource/tree/develop/7). – TallTed Feb 28 '19 at 22:00

0 Answers0