From ac7256905d585a56801873bdefeb21616cb3d820 Mon Sep 17 00:00:00 2001 From: Matthew Pitkin <matthew.pitkin@ligo.org> Date: Thu, 29 Feb 2024 15:27:09 +0000 Subject: [PATCH] Update sampler.py: don't read state from 0 bytes resume file --- bilby/bilby_mcmc/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bilby/bilby_mcmc/sampler.py b/bilby/bilby_mcmc/sampler.py index 6676c76d3..9aeaa731d 100644 --- a/bilby/bilby_mcmc/sampler.py +++ b/bilby/bilby_mcmc/sampler.py @@ -388,7 +388,7 @@ class Bilby_MCMC(MCMCSampler): If true, resume file was successfully loaded, otherwise false """ - if os.path.isfile(self.resume_file) is False: + if os.path.isfile(self.resume_file) is False or not os.path.getsize(self.resume_file): return False import dill -- GitLab