We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Querying a remote service with sparql AND selecting a graph by URI fails, because the match pattern for parsing the URL is greedy:
in rdflib/plugins/sparql/evaluate.py on line 347 (function evalServiceQuery the pattern is "^service <(.*)>[ \n]*{(.*)}[ \n]*$",.
rdflib/plugins/sparql/evaluate.py
evalServiceQuery
"^service <(.*)>[ \n]*{(.*)}[ \n]*$",
I changed this to "^service <(.*?)>[ \n]*{(.*)}[ \n]*$", and my use case worked.
"^service <(.*?)>[ \n]*{(.*)}[ \n]*$",
The slightly changed example from https://rdflib.readthedocs.io/en/stable/intro_to_sparql.html#querying-a-remote-service will not work without the improved pattern:
qres = g.query( """ SELECT ?s WHERE { SERVICE <https://dbpedia.org/sparql> { GRAPH <http://somegraph.uri.at> { ?s a ?o . } } } LIMIT 3 """ )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Querying a remote service with sparql AND selecting a graph by URI fails, because
the match pattern for parsing the URL is greedy:
in
rdflib/plugins/sparql/evaluate.py
on line 347 (functionevalServiceQuery
the patternis
"^service <(.*)>[ \n]*{(.*)}[ \n]*$",
.I changed this to
"^service <(.*?)>[ \n]*{(.*)}[ \n]*$",
and my use case worked.The slightly changed example from https://rdflib.readthedocs.io/en/stable/intro_to_sparql.html#querying-a-remote-service will not work without the improved pattern:
The text was updated successfully, but these errors were encountered: