The query works fine at the web interface, but raises an initNs not
supported exception with rdflib:
Traceback (most recent call last):
File "/home/lm/test_rdf2.py", line 19, in <module>
for row in graph.query(query_fran, initNs=ns):
File "/usr/local/lib/python2.7/dist-packages/rdflib-3.2.0_dev-py2.7.egg/rdflib/graph.py",
line 880, in query
return self.store.query(self,query_object, initNs, initBindings, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/rdfextras-0.2_dev-py2.7.egg/rdfextras/store/SPARQL.py",
line 249, in query
raise Exception("initNs not supported.")
Exception: initNs not supported.
[1] http://paste2.org/p/1859449
Any ideas?
-- luismiguel
It works writing the query with prefixes:
"""
PREFIX dcat: <http://vocab.deri.ie/dcat#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?d ?t ?s ?l FROM
<http://www.zaragoza.es/datosabiertos/catalogo> WHERE {?d a
dcat:Dataset . ?d dct:title ?t . ?d dct:subject ?s . ?s skos:prefLabel
?l}'''
"""
-- luismiguel
>
>
> -- luismiguel