Python rdflib and SPARQL BIND support

I am trying various SPARQL queries with BIND() function and neither seem to work with rdflib 4.0.

Each time I am getting:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.env/lib/python2.7/site-packages/rdflib/", line 1045, in query
    query_object, initBindings, initNs, **kwargs))
  File "~/.env/lib/python2.7/site-packages/rdfextras/sparql/", line 49, in query
  File "~/.env/lib/python2.7/site-packages/rdfextras/sparql/", line 406, in TopEvaluate
    assert isinstance(expr,AlgebraExpression), repr(expr)

edit Here's the query:

CONSTRUCT { ?aspectA ?predicateURI ?aspectLabel. } 
WHERE { ?aspectA aspects:A0060 ?aspectType; 
                 aspects:A0101 ?aspectLabel. 
        BIND ( IRI( CONCAT("some.uri/raw/aspects#A";, ?aspectType) ) AS ?predicateURI ). 

Any hints on what might be wrong?


I found where the problem came from. I started the project with some old rdflib which required rdfextras. They I upgraded rdflib to 4.0 (and eventually to 4.2-dev) where rdfextras are no longer necessary. Actually, registering them was causing that problem. Once I uninstalled rdfextras and removed plugin.register entries referencing them everything started to run smoothly.

Need Your Help

Delete a cookie if the key start by X in PHP

php cookies unset

I got some cookie start by XYZ and I want to unset them when the user access to a specific route.

Download and/or View .pdf on the same page

html iis anchor mime content-disposition

I am using IIS/ and have a requirement to have two links side by side on the same page. They both link to the same exact file, but with two different behaviors, one should view the file and...