How did you determine that sparql.setOnlyConneg(True) was the issue? On Wed, Aug 12, 2020, 7:40 AM Richard Dijkstra < richarddijkstra1...@gmail.com> wrote:
> Sergio, > > It was luckely just a user error. Apperently content negotiation is > required: > > sparql.setOnlyConneg(True) > > did the trick. > > So this code works fine to query and construct results from a local > Topbraid EDG server: > > endpoint = "http://localhost:8083/tbl/sparql" > query = """SELECT ?prop ?datatype > WHERE { > <http://example.org/ontologies/assetonto#Object> > sh:property ?prop . > OPTIONAL { > ?prop sh:datatype ?datatype . > } > }""" > > sparql = SPARQLWrapper(endpoint) > sparql.setQuery(query) > > sparql.addDefaultGraph("urn:x-evn-master:assetonto") > sparql.setOnlyConneg(True) > sparql.setReturnFormat(CSV) > result = sparql.query().convert() > > > kind regards, > Richard > > On Monday, July 6, 2020 at 5:44:24 PM UTC+2, Sergio Fernández wrote: >> >> Please, report the details if the issue to GitHub, and we'll try to >> troubleshoot it. >> >> On Mon., Jul. 6, 2020, 08:32 Richard Dijkstra <richarddi...@gmail.com> >> wrote: >> >>> I am not able to go to too much detail because my lack of knowledge of >>> proper requests etc >>> But interesting might be that the Python library sparql-client queries >>> the endpoint with no issues. >>> >>> However I want to use SPARQLwrapper because it has more features. >>> >>> >>> On Friday, July 3, 2020 at 4:00:33 PM UTC+2, Richard Dijkstra wrote: >>>> >>>> Thank you Wes for the tips for further investigations. I will give it a >>>> try next week. >>>> >>>> Regards, >>>> Ruchard >>>> >>> -- >>> http://github.com/RDFLib >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "rdflib-dev" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to rdfli...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/rdflib-dev/98176a74-860f-4647-83a6-80bcdec4919do%40googlegroups.com >>> <https://groups.google.com/d/msgid/rdflib-dev/98176a74-860f-4647-83a6-80bcdec4919do%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > http://github.com/RDFLib > --- > You received this message because you are subscribed to the Google Groups > "rdflib-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rdflib-dev+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rdflib-dev/e807c91b-e35f-4cc2-b490-f95bbc9650ffo%40googlegroups.com > <https://groups.google.com/d/msgid/rdflib-dev/e807c91b-e35f-4cc2-b490-f95bbc9650ffo%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- http://github.com/RDFLib --- You received this message because you are subscribed to the Google Groups "rdflib-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to rdflib-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/CACfEFw_MR5ueH69188Y4gWhWvL5sM-CM84xOakOa0FF2QLy%2Bjw%40mail.gmail.com.