File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -176,17 +176,15 @@ def from_dict(
176176
177177 try :
178178 instance = component_from_dict (component_class , component_data , name , callbacks )
179- except Exception as error :
179+ except Exception as e :
180180 msg = (
181- f"Couldn't deserialize component '{ name } ' of class '{ component_class .__name__ } ' because of:"
182- f"{ error } "
183- "Component was deserialized with the following data:"
184- f"{ str (component_data )} ."
185- "Possible reasons include malformed serialized data, mismatch between the serialized component "
186- "and the loaded one (due to a breaking change, see "
181+ f"Couldn't deserialize component '{ name } ' of class '{ component_class .__name__ } ' "
182+ f"with the following data: { str (component_data )} . Possible reasons include "
183+ "malformed serialized data, mismatch between the serialized component and the "
184+ "loaded one (due to a breaking change, see "
187185 "https://github.com/deepset-ai/haystack/releases), etc."
188186 )
189- raise DeserializationError (msg ) from error
187+ raise DeserializationError (msg ) from e
190188 pipe .add_component (name = name , instance = instance )
191189
192190 for connection in data .get ("connections" , []):
You can’t perform that action at this time.
0 commit comments