4 ms·
The file is in a with block - it should be automatically closed at the end of the block.
by nneonneo 7y ago
The file is in a with block - it should be automatically closed at the end of the block.
- tyingq 7y agoYes, but if it fixes the issue then there's something off with NamedTemporaryFile and its __exit__. You mentioned the file descriptor was being closed by a GC run, right?