From 4861fce3617d24a58e5fea039a1353cbfd21aa38 Mon Sep 17 00:00:00 2001 From: jackaraz Date: Thu, 25 Sep 2025 13:42:57 +0100 Subject: [PATCH] protection agains fail --- madanalysis/misc/run_recast.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/madanalysis/misc/run_recast.py b/madanalysis/misc/run_recast.py index c1275c9f..5487871c 100644 --- a/madanalysis/misc/run_recast.py +++ b/madanalysis/misc/run_recast.py @@ -1134,7 +1134,11 @@ def compute_cls(self, analyses, dataset): bibfile = os.path.join(self.dirname, "bibliography.bib") print_gl_citation = self.main.recasting.global_likelihoods_switch with open(bibfile, "w") as bib: - bib.write(spey.cite() + "\n") + try: + bib.write(spey.cite() + "\n") + except Exception as err: + self.logger.debug(err) + pass if self.pyhf_config: pyhfbib = spey.get_backend_bibtex("pyhf") for _, item in pyhfbib.items():