I'm having some trouble on execute a sparql update. As the title say the problem is the apostrophe in the 2nd triple of the query. This is the error:
Response: Error 400: Lexical error at line 20,column 229. Encountered " " (32) after: "s"
Here is the code in python:
from SPARQLWrapper import SPARQLWrapper
def Query(query):
sparql=SPARQLWrapper("http://localhost:3030/ann/update")
sparql.setQuery(query)
sparql.method='POST'
sparql.query()
query = """INSERT DATA {
<http://www.example.com> a <http://purl.org/spar/fabio/Item>;
rdfs:label 'Webpage's title'^^<http://www.w3.org/2000/01/rdf-schema#string>.
}"""
Query(query)
Any ideas on how to do it?