Closed vbanos closed 4 years ago
@nlevitt The error log I posted also answers your question about what happened right before the error that triggered the WARC writer exception.
When writing records, self.f.tell()
raised ValueError: I/O operation on closed file
.
Looks good to me.
The self.f.tell()
exception is interesting, but needless to say, I wonder why the file was closed at that point...
Recently, we found and fixed a problem when closing a WARC file. https://github.com/internetarchive/warcprox/pull/140
After using the updated warcprox in production, we got another exception in the same method, right after that point.
We don't have a WARC file and our code tries to run
os.rename
on a file that doesn't exist. We add exception handling for that case as well.I should have foreseen that when doing the previous fix :(