What is the stardog connection string format for rdflib

7 views
Skip to first unread message

Alex

unread,
Oct 23, 2015, 7:25:56 AM10/23/15
to Stardog
Hi,

There is helpful post online regarding connecting to stardog with rdflib with security disabled.

https://lawlesst.github.io/notebook/rdflib-stardog.html

Any ideas though what the SPARQLUpdateStore store.open() configuration string for stardog should look like if you have security enabled?


The following with encoded configString gives me an error.


configString = host=http%3A%2F%2F152.189.140.122%3A5820%2Folh%2Fquery,user=ccc,password=xxx,db=oty

store = sparqlstore.SPARQLUpdateStore()
store.open(configString,create=False)



[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/graph.py", line 1098, in update
[exec] **kwargs)
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 748, in update
[exec] self.commit()
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 603, in commit
[exec] r = self._do_update('\n;\n'.join(self._edits))
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 682, in _do_update
[exec] result = SPARQLWrapper.query(self)
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 535, in query
[exec] return QueryResult(self._query())
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 502, in _query
[exec] request = self._createRequest()
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 466, in _createRequest
[exec] request = urllib.request.Request(uri)
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 266, in __init__
[exec] self.full_url = url
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 292, in full_url
[exec] self._parse()
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 321, in _parse
[exec] raise ValueError("unknown url type: %r" % self.full_url)
[exec] ValueError: unknown url type: 'host= [exec] File "/usr/local/lib/python3.4/site-packages/rdflib/graph.py", line 1098, in update
[exec] **kwargs)
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 748, in update
[exec] self.commit()
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 603, in commit
[exec] r = self._do_update('\n;\n'.join(self._edits))
[exec] File "/usr/local/lib/python3.4/site-packages/rdflib/plugins/stores/sparqlstore.py", line 682, in _do_update
[exec] result = SPARQLWrapper.query(self)
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 535, in query
[exec] return QueryResult(self._query())
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 502, in _query
[exec] request = self._createRequest()
[exec] File "/usr/local/lib/python3.4/site-packages/SPARQLWrapper/Wrapper.py", line 466, in _createRequest
[exec] request = urllib.request.Request(uri)
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 266, in __init__
[exec] self.full_url = url
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 292, in full_url
[exec] self._parse()
[exec] File "/usr/lib64/python3.4/urllib/request.py", line 321, in _parse
[exec] raise ValueError("unknown url type: %r" % self.full_url)
[exec] ValueError: unknown url type: 'host=http%3A%2F%2F152.189.140.122%3A5820%2Folh%2Fquery,user=ccc,password=xxx,db=olh'


Regards
Alex

Reply all
Reply to author
Forward
0 new messages