[gdal-dev] Python IOError during file object destructor

Craig de Stigter craig.destigter at koordinates.com
Tue Aug 20 20:34:54 PDT 2019


Hey there

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:

  Exit code: 0
  stderr:
    ...
    close failed in file object destructor:
    IOError: [Errno 5] Input/output error


I *suspect strongly* that this IOError is happening during process
shutdown, and also that it is coming from GDAL rather than our code (I
could be wrong!)

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.

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.

TIA

-- 
Regards,
Craig

Developer
Koordinates

+64 21 256 9488 <+64%2021%20256%209488> / koordinates.com / @koordinates
<https://twitter.com/koordinates>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190821/45d9d7ba/attachment.html>


More information about the gdal-dev mailing list