insert with No auth

21 views
Skip to first unread message

richarddi...@gmail.com

unread,
Aug 20, 2020, 6:55:05 AM8/20/20
to rdflib-dev

Dear all,

Ik want to insert triples in a sparql endpoint that has no authorisation because it runs on my local machine. I do get an 500 error and assume that is caused by permissions.

I do not use any authorisation so both sparql.setHTTPAuth(BASIC or DIGEST ) are not approperiate, None is not accepted.

How can this be done?

Regards,
Richard D

Carlos Tejo

unread,
Aug 20, 2020, 1:49:39 PM8/20/20
to rdfli...@googlegroups.com
Dear Richard,

Maybe I am not catching all the details of your question, but it looks like setCredentials is used somewhere in your code, because auth is only applied in case credentials has been provided.


Just in case, this is an example SPARQL update query https://sparqlwrapper.readthedocs.io/en/stable/main.html#sparql-update-example

In your case, you will need to be remove these lines:
sparql.setHTTPAuth(DIGEST)
sparql.setCredentials("login", "password") 

I hope it helps

Best,

Carlos Tejo

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdflib-dev/87a68f13-1900-49ed-a3ef-a2d18af482een%40googlegroups.com.

richarddi...@gmail.com

unread,
Aug 23, 2020, 9:39:50 AM8/23/20
to rdflib-dev
Inserts are no effortless. The issue was the default graph specification. The 500 error I got did not lead me to this.
The code I run now to insert triples into a Topbraid EDG development server is as follows:

    endpoint = "http://localhost:8083/tbl/sparql" 
    query = """
        INSERT DATA {graph <urn:x-evn-master:testdata>
        }"""
    sparql = SPARQLWrapper(endpoint)
    
    sparql.setQuery(query)
    result = sparql.query()

regards,
Richard
Reply all
Reply to author
Forward
0 new messages