I found it by a Google search resulting in some code that had some of these Sparql settings. By luck this worked. Then I started looking for default behaviour by eliminating explicite settings. setOnlyConneg has a default Setting False which was the 406 cause. From some extra testing no other setting was causing a 406.
We might add the possible options for accessing the Topbraid EDG server Sparql endpoint in the documentation. I believe their Sparql engine originates from Jena but has some extra capabilities. > Op 12 aug. 2020 om 16:47 heeft Wes Turner <wes.tur...@gmail.com> het volgende > geschreven: > > > 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. >> >> -- >> 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. > > -- > 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. -- 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/1FD48B54-FBE5-452E-ABA8-A3E98FDC0DD2%40gmail.com.