Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPTIONAL is not supported in SPARQL UPDATE #233

Open
shinobu opened this issue May 16, 2019 · 1 comment
Open

OPTIONAL is not supported in SPARQL UPDATE #233

shinobu opened this issue May 16, 2019 · 1 comment

Comments

@shinobu
Copy link

shinobu commented May 16, 2019

Attempting to use an OPTIONAL in a SPARQL UPDATE query, like this one:

DELETE {
    GRAPH <http://example.org> {
      ?s ?p ?o .
      ?o ?a ?b .
    }
  }
WHERE
    { GRAPH <http://example.org>
        { ?s  ?p  ?o .
          OPTIONAL { ?o ?a ?b . }
  } }

leads to an Error. The stacktrace looks like this:

argument of type 'NoneType' is not iterable
Traceback (most recent call last):
  File "quit/web/modules/endpoint.py", line 140, in sparql
  File "quit/core.py", line 421, in applyQueryOnCommit
  File "quit/core.py", line 90, in update
  File "site-packages/rdflib/graph.py", line 1099, in update
  File "quit/tools/processor.py", line 17, in update
  File "quit/tools/update.py", line 415, in evalUpdate
  File "quit/tools/update.py", line 250, in evalModify
  File "site-packages/rdflib/plugins/sparql/evaluate.py", line 226, in evalPart
  File "site-packages/rdflib/plugins/sparql/evaluate.py", line 111, in evalJoin
  File "site-packages/rdflib/plugins/sparql/evaluate.py", line 183, in evalGraph
  File "site-packages/rdflib/plugins/sparql/evaluate.py", line 134, in evalLeftJoin
  File "site-packages/rdflib/plugins/sparql/sparql.py", line 212, in forget
  File "site-packages/rdflib/plugins/sparql/sparql.py", line 165, in __init__
  File "site-packages/rdflib/plugins/sparql/sparql.py", line 107, in __init__
  File "site-packages/rdflib/plugins/sparql/sparql.py", line 214, in <genexpr>
TypeError: argument of type 'NoneType' is not iterable
::ffff:127.0.0.1 - - [16/May/2019 16:01:47] "POST /sparql HTTP/1.1" 400 -

@splattater was capable of reproducing the Error.

@white-gecko
Copy link
Member

Does this also happen in the RDFlib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants