<div dir="ltr"><div>Hey there</div><div><br></div><div>We're using the python bindings to do all sorts of translates and warps and things, and I don't have a proper traceback but we got this in some of our processes lately:</div><div><br></div><div><pre class="gmail-c-mrkdwn__pre" style="box-sizing:inherit;margin:4px 0px;padding:8px;font-size:12px;line-height:1.50001;font-variant-ligatures:none;white-space:pre-wrap;word-break:normal;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;border:1px solid rgba(0,0,0,0.15);border-radius:4px;color:rgb(29,28,29);font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">  Exit code: 0<br style="box-sizing:inherit">  stderr:<br>    ...<br style="box-sizing:inherit">    close failed in file object destructor:<br style="box-sizing:inherit">    IOError: [Errno 5] Input/output error</pre></div><div><br></div><div>I <i>suspect strongly</i> that this IOError is happening during process shutdown, and also that it is coming from GDAL rather than our code (I could be wrong!)</div><div><br></div><div>The IOError itself must have come from a disk problem, but instead of being raised, this IOError was silently ignored, leading to problems with a corrupted file later.<br></div><div><br></div><div>As far as I can tell all GDAL datasets have gone out of scope long before the process exits. However I wondered if we should be calling some kind of shutdown function to force GDAL to close all its file handles, or something. I recall various things like that existing (e.g. `GDALDestroyDriverManager()`) from my pytest-related work, but at present we're not using anything like that anywhere.<br></div><div><br></div><div>TIA<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Regards,</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Craig</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Developer</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Koordinates</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><a href="tel:+64%2021%20256%209488" style="color:rgb(17,85,204)" target="_blank">+64 21 256 9488</a> / <a href="http://koordinates.com/" style="color:rgb(17,85,204)" target="_blank">koordinates.com</a> / <a href="https://twitter.com/koordinates" style="color:rgb(17,85,204)" target="_blank">@koordinates</a></div></div></div></div></div>