Catch error if trying to load zero bytes resume file
Compare changes
Files
4- Matthew David Pitkin authored
Maintenance will be performed on git.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 24 March 2025 starting at approximately 8:30am PDT. It is expected to take around 30 minutes and there will be several periods of downtime throughout the maintenance. Please address any comments, concerns, or questions to the helpdesk.
Currently, when loading a resume file, it assumes that dill.load()
will work successfully. This requires that the file is a valid pickle file, even if it an empty file (as generated by bilby_pipe for file transfer reasons). However, if would be useful if this could just be a generic zero bytes dummy file as output by, e.g., touch
.
This MR adds try...except
calls around dill.load()
to catch cases of zero bytes files, or checks for check point files being 0 bytes in size.