File tree 1 file changed +8
-7
lines changed
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -176,15 +176,16 @@ def from_dict(
176
176
177
177
try :
178
178
instance = component_from_dict (component_class , component_data , name , callbacks )
179
- except Exception as e :
179
+ except Exception as error :
180
180
msg = (
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 "
185
- "https://github.com/deepset-ai/haystack/releases), etc."
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 https://github.com/deepset-ai/haystack/releases), etc."
186
187
)
187
- raise DeserializationError (msg ) from e
188
+ raise DeserializationError (msg ) from error
188
189
pipe .add_component (name = name , instance = instance )
189
190
190
191
for connection in data .get ("connections" , []):
You can’t perform that action at this time.
0 commit comments