From 7894d0b55615c8d902d4ff43f1c110115e83bd33 Mon Sep 17 00:00:00 2001 From: "Christopher J. Markiewicz" Date: Tue, 2 Mar 2021 11:25:44 -0500 Subject: [PATCH] FIX: Only check for self.input_spec if not in state --- pydra/engine/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pydra/engine/core.py b/pydra/engine/core.py index e5638fd5d2..9582073206 100644 --- a/pydra/engine/core.py +++ b/pydra/engine/core.py @@ -217,7 +217,9 @@ def __setstate__(self, state): state["input_spec"] = cp.loads(state["input_spec"]) if "output_spec" in state: state["output_spec"] = cp.loads(state["output_spec"]) - input_spec = state.get("input_spec", getattr(self, "input_spec", None)) + input_spec = state.get("input_spec") + if input_spec is None: # If it is not saved, it should be a class attribute + input_spec = self.input_spec state["inputs"] = make_klass(input_spec)(**state["inputs"]) self.__dict__.update(state)