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

Error parsing simple DESCRIBE query #813

Closed
johnstonskj opened this issue Mar 1, 2018 · 6 comments
Closed

Error parsing simple DESCRIBE query #813

johnstonskj opened this issue Mar 1, 2018 · 6 comments
Labels
enhancement New feature or request marked for closing The issue or PR will be closed soon if no further feedback is provided. reconfirm This issue may be solved already and should be reconfirmed. SPARQL

Comments

@johnstonskj
Copy link

johnstonskj commented Mar 1, 2018

A simple query of the form DESCRIBE <http://example.org/> results in the following stacktrace.

  File "/Users/simonjo/anaconda/lib/python3.5/site-packages/rdflib/plugins/sparql/processor.py", line 75, in query
    query = translateQuery(parsetree, base, initNs)
  File "/Users/simonjo/anaconda/lib/python3.5/site-packages/rdflib/plugins/sparql/algebra.py", line 766, in translateQuery
    P, PV = translate(q[1])
  File "/Users/simonjo/anaconda/lib/python3.5/site-packages/rdflib/plugins/sparql/algebra.py", line 549, in translate
    M = translateGroupGraphPattern(q.where)
  File "/Users/simonjo/anaconda/lib/python3.5/site-packages/rdflib/plugins/sparql/algebra.py", line 269, in translateGroupGraphPattern
    if graphPattern.name == 'SubSelect':
AttributeError: 'NoneType' object has no attribute 'name'

The call to translateGroupGraphPattern in algebra.py states incorrectly that queries always include a where clause. This is not the case for DESCRIBE, see SPARQL 1.1 section 16.4.1 (SPARQL 1.0 section 10.4.1) "Explicit IRIs".

# all query types have a where part
M = translateGroupGraphPattern(q.where)

@luckyagarwal
Copy link

luckyagarwal commented May 29, 2020

@johnstonskj the above issue has now been fixed.

@aucampia
Copy link
Member

aucampia commented May 12, 2022

@ms1901
Copy link

ms1901 commented May 13, 2022

Hey, I am working to resolve this issue and will be sending a PR soon.

@ghost
Copy link

ghost commented May 13, 2022

Hey, I am working to resolve this issue and will be sending a PR soon.

Please note the existing ongoing work on this same issue in #479 and the previous partial implementation in https://github.com/gjhiggins/rdflib/commit/5fb6f43e6b1d2264ac5015c260b32fc4e7dbf240

@aucampia aucampia added marked for closing The issue or PR will be closed soon if no further feedback is provided. enhancement New feature or request labels Mar 25, 2023
@aucampia
Copy link
Member

This was implemented in #2221 and should now be working. Please confirm if you can.

I will close this issue in some weeks if there is no further feedback.

@aucampia aucampia added the reconfirm This issue may be solved already and should be reconfirmed. label Mar 25, 2023
@aucampia
Copy link
Member

Closing this as DESCRIBE was implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request marked for closing The issue or PR will be closed soon if no further feedback is provided. reconfirm This issue may be solved already and should be reconfirmed. SPARQL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants