I am using pystardog and have the following code ...
sparql = 'DROP GRAPH urn:e8dae583-f236-4ba5-a12f-39c956788916'
conn.begin()
conn.update(sparql)
conn.commit()
Studio shows that the indicated graph exists. (Select distinct ?g {graph ?g {?s ?p ?o}})
But I get the following error:
com.complexible.stardog.plan.eval.ExecutionException: Source graph urn:e8dae583-f236-4ba5-a12f-39c956788916 does not exist, cannot proceed with update.
Here are the details:
---------------------------------------------------------------------------
StardogException Traceback (most recent call last)
<ipython-input-18-8fc1042676bf> in <module>
1 sparql = 'DROP GRAPH <urn:e8dae583-f236-4ba5-a12f-39c956788916>;'
2 conn.begin()
----> 3 conn.update(sparql)
4 conn.commit()
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/stardog/connection.py in update(self, query, **kwargs)
350 >>> conn.update('delete where {?s ?p ?o}')
351 """
--> 352 self.conn.update(query, self.transaction, **kwargs)
353
354 def is_consistent(self, graph_uri=None):
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/stardog/http/connection.py in update(self, query, transaction, **kwargs)
90
91 def update(self, query, transaction=None, **kwargs):
---> 92 self.__query(query, 'update', transaction, None, **kwargs)
93
94 def __query(self,
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/stardog/http/connection.py in __query(self, query, method, transaction, content_type, **kwargs)
115 method) if transaction else '/{}'.format(method)
116
--> 117 return self.client.post(
118 url,
119 data=params,
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/stardog/http/client.py in post(self, path, **kwargs)
27
28 def post(self, path, **kwargs):
---> 29 return self.__wrap(self.session.post(self.url + path, **kwargs))
30
31 def put(self, path, **kwargs):
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/stardog/http/client.py in __wrap(self, request)
49 msg = {'message': request.text}
50
---> 51 raise exceptions.StardogException('[{}] {}: {}'.format(
52 request.status_code, msg.get('code', ''), msg.get(
53 'message', '')))
StardogException: [500] QEQOE2: com.complexible.stardog.plan.eval.ExecutionException: Source graph urn:e8dae583-f236-4ba5-a12f-39c956788916 does not exist, cannot proceed with update.