From 4171132c71c418d274ea648391e9ef3c45f2edd5 Mon Sep 17 00:00:00 2001 From: Noam Bernstein Date: Sat, 26 Oct 2024 21:03:36 -0400 Subject: [PATCH] Fix reraise in calculators.generic per-config calculator construction --- wfl/calculators/generic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfl/calculators/generic.py b/wfl/calculators/generic.py index 544b8103..62b8843c 100644 --- a/wfl/calculators/generic.py +++ b/wfl/calculators/generic.py @@ -80,7 +80,7 @@ def _run_autopara_wrappable(atoms, calculator, properties=None, output_prefix='_ raise TypeError("calculators.generic.calculate got WFL_CALCULATOR_INITIALIZER, _ARGS, or _KWARGS " f"but constructor failed, most likely because calculator wasn't a tuple (TypeError) " "or original tuple had invalid element that wasn't overridden by `Atoms.info` entry. " - f"Constructor exception was '{exc}'") + f"Constructor exception was '{exc}'") from exc if calculator_use is None: raise ValueError(f"Failed to construct calculator, original attempt's exception was '{calculator_failure_message}'")