-
Notifications
You must be signed in to change notification settings - Fork 14
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
Adding Prefixes to SPARQL query helper causes "does not look like a valid URI, trying to serialize this will break" #741
Comments
Hello @Superraptor , I don't understand your issue, maybe there is a missing part, do you have a code example to share? |
@LeMyst thanks for responding! So I'm basically running this:
Each time this runs, it works, but it prints this to console:
If I run this:
It works and does not print anything to console. This would be fine, but I do have some queries where the prefixes have to be declared. And when you're running 10,000+ queries, having a warning print to console 10,000+ times really clutters things. |
I'm not sure what in WikibaseIntegrator can create this behavior. import logging
logging.basicConfig(level=logging.DEBUG) I don't think this will help at all, but, for your information, execute_sparql_query accept a "prefix" parameter where you can add your prefixes (but in the end, it only concatenate the prefix and your query) |
"does not look like a valid URI" did not return any results in the repo. This is propagated from somewhere else... |
Like @dpriskorn , without any more informations, it's difficult to solve the issue. |
This isn't a huge issue, just more annoying with large datasets, but essentially, SPARQL queries work regardless of whether prefixes are defined in them or not.
However, with prefixes, I always get a warning that is
PREFIX wd: <https://wikiname.wikibase.cloud/entity/> PREFIX wdt: <https://wikiname.wikibase.cloud/prop/direct/> SELECT ?p ?o WHERE { <https://wikiname.wikibase.cloud/entity/Q4087> ?p ?o } does not look like a valid URI, trying to serialize this will break.
. Since I'm running thousands of queries though-- this pops up a lot.Is there either (a) a way to stop this warning or solve whatever serialization error is occurring (either by declaring prefixes in a different place or changing the query, or (b) a way to silence or suppress these warnings if (a) isn't possible?
Thanks so much!
The text was updated successfully, but these errors were encountered: