Sparql - Unknown Namespace Prefix Error
I have a python file with imported rdflib and some SPARQL query implemented from rdflib import Graph import html5lib if __name__ == '__main__': g = Graph() g.parse('http:
Solution 1:
As the error message suggests, the namespace weather:
is not defined - so in the SPARQL you either need a PREFIX to define weather, like:
PREFIX weather: <weatheruri>
Or you should put the explicit weather URI instead of the weather:
The weather namespace URI (or is it called an IRI?) will be in the XML namespaces in the rdf document - it will end with / or # so if the URI is http://weather.com/
the prefix definition is PREFIX weather: <http://weather.com/>
Post a Comment for "Sparql - Unknown Namespace Prefix Error"