-
Notifications
You must be signed in to change notification settings - Fork 581
Description
Apparently DESCRIBE queries are not fully implemented yet? This is what I get with two different queries:
- g.query('DESCRIBE http://www.example.org/a')
...
/usr/lib/python2.7/site-packages/rdflib/plugins/sparql/algebra.pyc in translate(q)
530
531 # all query types have a where part
--> 532 M = translateGroupGraphPattern(q.where)
533
534 aggregate = False
/usr/lib/python2.7/site-packages/rdflib/plugins/sparql/algebra.pyc in translateGroupGraphPattern(graphPattern)
261 """
262
--> 263 if graphPattern.name == 'SubSelect':
264 return ToMultiSet(translate(graphPattern)[0])
265
AttributeError: 'NoneType' object has no attribute 'name'
- g.query('DESCRIBE ?s WHERE {?s ?p ?o FILTER (?s = http://www.example.org/a)}')
...
/usr/lib/python2.7/site-packages/rdflib/plugins/sparql/evaluate.pyc in evalPart(ctx, part)
260
261 elif part.name == 'DescribeQuery':
--> 262 raise Exception('DESCRIBE not implemented')
263
264 else:
Exception: DESCRIBE not implemented
The graph is created via this sequence:
import rdflib
from rdflib import RDF
ex = rdflib.Namespace('http://www.example.org/')
g = rdflib.Graph()
g.add((ex['a'], RDF['type'], ex['Cl']))