Matt, What is the query code? The following works fine for me.
from SPARQLWrapper import SPARQLWrapper, JSON > > sparql = SPARQLWrapper("http://dbpedia.org/sparql") > #sparql = SPARQLWrapper("http://dbpedia.org/resource/Adam_Małysz") > > sparql.setQuery(""" > PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> > SELECT ?label > WHERE { <http://dbpedia.org/resource/Adam_Małysz> rdfs:label ?label } > """) > sparql.setReturnFormat(JSON) > results = sparql.query().convert() > > for result in results["results"]["bindings"]: > print(result["label"]["value"]) > Richard On Friday, January 11, 2019 at 7:48:45 PM UTC+1, pici...@gmail.com wrote: > > Hi! > > I try to parse and check some sentences in dbpedia graph. While using > rdflib.Graph().load(resource) where resource=' > http://dbpedia.org/resource/Adam_Małysz' I get an error: 'ascii' codec > can't encode character '\u0142' in position 21: ordinal not in range(128). > My question is - am I missing something, or there actually is no way to > change that ascii encoding to utf-8? I even tried to find the erroneous > part in lib's code under debugger, but with no result (the number of steps > is massively overwhelming for me, as I don't know the lib well). > > Kind regards > Matt -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To post to this group, send email to rdflib-dev@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/4fed0021-1739-4013-8e20-5e6aebb6b0e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.