Skip to content

Commit

Permalink
Merge branch 'test-imports' of https://github.com/deepset-ai/haystack
Browse files Browse the repository at this point in the history
…into test-imports
  • Loading branch information
anakin87 committed Nov 28, 2024
2 parents 2032f48 + 4c94b80 commit bfebfd6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions haystack/core/pipeline/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,15 @@ def from_dict(

try:
instance = component_from_dict(component_class, component_data, name, callbacks)
except Exception as error:
except Exception as e:
msg = (
f"Couldn't deserialize component '{name}' of class '{component_class.__name__}' because of:"
f"{error}"
"Component was deserialized with the following data:"
f"{str(component_data)}."
"Possible reasons include malformed serialized data, mismatch between the serialized component "
"and the loaded one (due to a breaking change, see "
f"Couldn't deserialize component '{name}' of class '{component_class.__name__}' "
f"with the following data: {str(component_data)}. Possible reasons include "
"malformed serialized data, mismatch between the serialized component and the "
"loaded one (due to a breaking change, see "
"https://github.com/deepset-ai/haystack/releases), etc."
)
raise DeserializationError(msg) from error
raise DeserializationError(msg) from e
pipe.add_component(name=name, instance=instance)

for connection in data.get("connections", []):
Expand Down

0 comments on commit bfebfd6

Please sign in to comment.