# DROP named graph fails

**URL:** <https://community.stardog.com/t/drop-named-graph-fails/2526>\
**Category:** Bug\
**Created:** [June 15, 2020, 3:31pm UTC](https://community.stardog.com/t/drop-named-graph-fails/2526 "2020-06-15T15:31:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arwesterinen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/arwesterinen/32/40_2.png) [@arwesterinen](https://community.stardog.com/u/arwesterinen)\
**Post date:** [June 15, 2020, 3:31pm UTC](https://community.stardog.com/t/drop-named-graph-fails/2526/1 "2020-06-15T15:31:31Z")

</div>

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:

```auto
---------------------------------------------------------------------------
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.

```

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [June 15, 2020, 3:36pm UTC](https://community.stardog.com/t/drop-named-graph-fails/2526/2 "2020-06-15T15:36:17Z")

</div>

Is there anything in stardog.log?

---

<div class="post-metadata">

**Author:** ![arwesterinen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/arwesterinen/32/40_2.png) [@arwesterinen](https://community.stardog.com/u/arwesterinen)\
**Post date:** [June 15, 2020, 4:13pm UTC](https://community.stardog.com/t/drop-named-graph-fails/2526/3 "2020-06-15T16:13:42Z")

</div>

Checking for more detail. Also, rechecking the code that generated the graph.

Andrea
