Closed julian-risch closed 11 months ago
Using a component in Haystack that has an output connection named text/plain I noticed that the split by \ in canals fails for connections with / in the name when calling to_dict.
text/plain
\
/
to_dict
The line that fails is https://github.com/deepset-ai/canals/blob/2971b4de2aeea28704ad03931e16dd6f642ada8b/canals/pipeline/pipeline.py#L93 with a ValueError: too many values to unpack (expected 2)
ValueError: too many values to unpack (expected 2)
To reproduce, from this PR https://github.com/deepset-ai/haystack/pull/6037/:
from haystack.preview import Pipeline from haystack.preview.components.routers import FileTypeRouter from haystack.preview.components.file_converters import TextFileToDocument p = Pipeline() p.add_component(instance=FileTypeRouter(mime_types=["text/plain"]), name="file_type_router") p.add_component(instance=TextFileToDocument(), name="text_file_converter") p.connect("file_type_router.text/plain", "text_file_converter.paths")
Using a component in Haystack that has an output connection named
text/plain
I noticed that the split by\
in canals fails for connections with/
in the name when callingto_dict
.The line that fails is https://github.com/deepset-ai/canals/blob/2971b4de2aeea28704ad03931e16dd6f642ada8b/canals/pipeline/pipeline.py#L93 with a
ValueError: too many values to unpack (expected 2)
To reproduce, from this PR https://github.com/deepset-ai/haystack/pull/6037/: