Skip to content

DESCRIBE query not working #479

@nvitucci

Description

@nvitucci

Apparently DESCRIBE queries are not fully implemented yet? This is what I get with two different queries:

  1. 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'

  1. 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']))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions