-
Notifications
You must be signed in to change notification settings - Fork 579
Closed
Description
This is important because some SPARQL stores return IRI-based namespaces, which lxml and etree do not support. Using a JSON result type will circumvent these issues.
There are a number of issues that arise when you attempt this:
foo = SPARQLStore(..., returnFormat=SPARQLWrapper.JSON)
This causes an error because the returnFormat is also hard-coded as a parameter to the SPARQLWrapper function.
Setting the returnFormat (setReturnFormat()) after construction is insufficient because resetQuery() resets it to _defaultReturnFormat. Setting _defaultReturnFormat works for the actual wrapper, but sparqlstore.py:318 does not pass the format on to Result.parse():
return Result.parse(res)
should be:
return Result.parse(res, format=self.returnFormat)
Metadata
Metadata
Assignees
Labels
No labels