> text/html;charset=utf-8
Probably because the other end is an HTML page, maybe a query form, not
and a SPARQL endpoint.
There are several system that advertise thei HTML form and the form then
goes to the SPARQL endpoint which is at a different URL.
Andy
On 15/08/2020 07:16, Wolfgang Fahl wrote:
see also https://github.com/RDFLib/sparqlwrapper/issues/159
when using SPARQLWrapper in python for an INSERT i get the error message.
/RuntimeWarning: unknown response content type 'text/html;charset=utf-8' //
/
/Carlos Tejo Alonso now pointed
tohttps://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/#query-success
/
/stating /that the response body format is implementation specific. What
options are available for Apache Jena for e.g. content negotiation in
this case
and how can this be achieved with SPARQLWrapper?
//
(See unit test and sample code below) see also
http://wiki.bitplan.com/index.php/DgraphAndWeaviateTest
def testJenaInsert(self):
jena=self.getJena(mode="update")
insertString = """
PREFIX cr: <http://cr.bitplan.com/>
INSERT DATA {
cr:version cr:author "Wolfgang Fahl".
}
"""
results=jena.rawQuery(insertString)
print (results)
...
def rawQuery(self,queryString,method='POST'):
'''
query with the given query string
'''
self.sparql.setQuery(queryString)
self.sparql.method=method
queryResult = self.sparql.query()
jsonResult=queryResult.convert()
return jsonResult
--
Wolfgang Fahl
Pater-Delp-Str. 1, D-47877 Willich Schiefbahn
Tel. +49 2154 811-480, Fax +49 2154 811-481
Web:http://www.bitplan.de