-
Notifications
You must be signed in to change notification settings - Fork 124
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
using "describe" in a comment leads to error #211
Comments
query# Count all academic conference(Q2020153) https://www.wikidata.org/wiki/Q2020153 items
# with the given describ'd at URL(P973) https://www.wikidata.org/wiki/Property:P973
SELECT ?item (COUNT (?value) AS ?count)
WHERE
{
# instance of academic conference
?item wdt:P31 wd:Q2020153.
# describ'd at URL
?item wdt:P973 ?value.
} GROUP by ?item
HAVING (COUNT (?value) > 1)
ORDER BY DESC(?count) result
|
$ rqw --version
rqw 2.0.0
$ cat query.rq
# Count all academic conference(Q2020153) https://www.wikidata.org/wiki/Q2020153 items
# with the given described at URL(P973) https://www.wikidata.org/wiki/Property:P973
SELECT ?item (COUNT (?value) AS ?count)
WHERE
{
# instance of academic conference
?item wdt:P31 wd:Q2020153.
# described at URL
?item wdt:P973 ?value.
} GROUP by ?item
HAVING (COUNT (?value) > 1)
ORDER BY DESC(?count)
$ rqw -e 'https://query.wikidata.org/sparql' -f query.rq
/Users/eggplants/.pyenv/versions/3.9.10/lib/python3.9/site-packages/SPARQLWrapper/Wrapper.py:794: RuntimeWarning: Sending Accept header '*/*' because unexpected returned format 'json' in a 'DESCRIBE' SPARQL query form
warnings.warn(
{
"head": {
"vars": [
"item",
"count"
]
},
"results": {
"bindings": [
{
"item": {
"type": "uri",
"value": "http://www.wikidata.org/entity/Q106540635"
},
"count": {
"datatype": "http://www.w3.org/2001/XMLSchema#integer",
"type": "literal",
"value": "3"
}
},
{
"item": {
"type": "uri",
"value": "http://www.wikidata.org/entity/Q106331820"
},
"count": {
"datatype": "http://www.w3.org/2001/XMLSchema#integer",
"type": "literal",
"value": "2"
}
}
]
}
} @WolfgangFahl What version are you using? |
since this seems not to be the most recent i did
|
Why does the runtime warning lead to a failure in the programmatic access? |
What do you mean |
Oh 2.0.0 was just release today - now i get it. The pyLodStorage unit tests seem to fail with this see https://github.com/WolfgangFahl/pyLoDStorage/actions. |
This apparently mismatch of query type maybe causes: sparqlwrapper/SPARQLWrapper/Wrapper.py Lines 616 to 621 in db695a5
2.0.0 has huge breaking changes. |
@WolfgangFahl Rdflib members seems to be under-resourced. |
Just did a 0.1.19 release for pyLodStorage pinning sparqlwrapper to 1.8.5 i am now working on the 0.2.0 release intending to use the newer version of SPARQLWrapper. I'll have to work around the "described" issue for the time being in my downstream projects until things are fixed here. No i don't really have time to help with PRs - pyLodStorage was created as a separate project after #160 was not incorporated directly here. We could merge things again but that would be some major refactoring effort. I would love to have the named query and query result documentation support being integrated here for instance see WolfgangFahl/pyLoDStorage#78. |
Sparqlwrapper uses regular expressions for uncommenting queries and extracting types, which is a bad point and problematic. It may be better to use |
@eggplants - thx for your current engagement. When i wrote " No i don't really have time to help with PRs" - this means that currently i am busy. I have already closed one of the issues you mentioned and intend to do more in the future. I suggest to open the discussions here in github for being able to have some communication about ideas and other aspects that are not directly issue related. |
will fail.
.. lib/python/site-packages/SPARQLWrapper/Wrapper.py:979: RuntimeWarning: Sending Accept header '/' because unexpected returned format 'json' in a 'DESCRIBE' SPARQL query form
warnings.warn("Sending Accept header '/' because unexpected returned format '%s' in a '%s' SPARQL query form" % (self.returnFormat, self.queryType), RuntimeWarning)
The text was updated successfully, but these errors were encountered: