I think I&#39;ve figured out what goes wrong. The exception occurs during automated testing, with a temporary root for the database storage among other things. This root is deleted once<br> testing finishes,&nbsp;and&nbsp;before&nbsp;the&nbsp;database&nbsp;is&nbsp;closed&nbsp;it&nbsp;seems.&nbsp;The&nbsp;resulting&nbsp;exception&nbsp;is&nbsp;a&nbsp;bit&nbsp;confusing&nbsp;however,&nbsp;maybe&nbsp;ZODB&nbsp;should&nbsp;be&nbsp;a&nbsp;bit&nbsp;more&nbsp;robust&nbsp;toward&nbsp;this&nbsp;sort&nbsp;of&nbsp;scenario?
<br>Maybe&nbsp;a&nbsp;corresponding&nbsp;exception&nbsp;could&nbsp;be&nbsp;raised&nbsp;if&nbsp;the&nbsp;storage&nbsp;doesn&#39;t&nbsp;exist&nbsp;on&nbsp;disk, e.g. &quot;StorageMissing&quot;?<br> <br>Arve<br><br><div><span class="gmail_quote">On 2/15/07, <b class="gmail_sendername">Arve Knudsen
</b> &lt;<a href="mailto:arve.knudsen@gmail.com">arve.knudsen@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
Hi, Dieter<br><br><div><div><span class="e" id="q_110c5a4c6d929686_1"><span class="gmail_quote">On 2/14/07, <b class="gmail_sendername">Dieter Maurer</b> &lt;<a href="mailto:dieter@handshake.de" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
dieter@handshake.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin-top: 0; margin-right: 0; margin-bottom: 0; margin-left: 0; margin-left: 0.80ex; border-left-color: #cccccc; border-left-width: 1px; border-left-style: solid; padding-left: 1ex">
 Arve Knudsen wrote at 2007-2-14 16:34 +0100:<br>&gt;I sometimes receive an exception when closing a ZODB, due to it trying to<br>&gt;remove a lock file which doesn&#39;t exist. Given the backtrace can you tell me<br>&gt;whether this is something which should be rectified in ZODB? I suspect the 
<br>&gt;problem lies in the fact that the database is closed from atexit, maybe ZODB<br>&gt;has already registered some kind of cleanup from atexit?<br><br>Have you registered a &quot;close&quot; function for your storage, too? 
<br><br>The API is a bit inconsitent:<br><br>&nbsp;&nbsp;While you open both a storage and a DB, the &quot;DB.close()&quot; implicitly<br>&nbsp;&nbsp;closes the storage as well.<br><br>&nbsp;&nbsp;Thus, if you have registered a &quot;storage.close&quot;, the &quot; 
DB.close()&quot;<br>&nbsp;&nbsp;might find the storage already closed and get an error as you<br>&nbsp;&nbsp;reported.</blockquote></span></div><div><br>I&nbsp;haven&#39;t&nbsp;scheduled&nbsp;the&nbsp;storage&nbsp;for&nbsp;closing,&nbsp;it&nbsp;only&nbsp;exists&nbsp;within&nbsp;my&nbsp;database.&nbsp;I&nbsp;added&nbsp;some&nbsp;debugging&nbsp;statements&nbsp;to&nbsp;see&nbsp;if&nbsp;the&nbsp;ZODB&nbsp;storage&nbsp;were&nbsp;closed&nbsp;several&nbsp;times,&nbsp;but&nbsp;it&nbsp;was&nbsp;not&nbsp;so.&nbsp;So&nbsp;it&nbsp;seems&nbsp;this&nbsp;is&nbsp;internal&nbsp;to&nbsp;ZODB. 
<br><br>Arve&nbsp;&nbsp;</div><br></div><br></blockquote></div><br>