deepset-ai/haystack · error · PipelineConnectError
'${sender}' does not exist. Output connections of ${sender_c
Error message
'${sender}' does not exist. Output connections of ${sender_component_name} are: {} What it means
Pipeline.connect() raises PipelineConnectError when an explicitly given sender socket name (in 'component.socket' syntax) does not match any output socket of the sender component. The error lists the actual available output connections with their types.
Source
Thrown at haystack/core/pipeline/base.py:644
raise ValueError(f"Component named {sender_component_name} not found in the pipeline.") from exc
try:
receiver_sockets = self.graph.nodes[receiver_component_name]["input_sockets"]
except KeyError as exc:
raise ValueError(f"Component named {receiver_component_name} not found in the pipeline.") from exc
if not sender_sockets:
raise PipelineConnectError(
f"'{sender_component_name}' does not have any output connections. "
f"Please check that the output types of '{sender_component_name}.run' are set, "
f"for example by using the '@component.output_types' decorator."
)
# If the name of either socket is given, get the socket
sender_socket: OutputSocket | None = None
if sender_socket_name:
sender_socket = sender_sockets.get(sender_socket_name)
if not sender_socket:
raise PipelineConnectError(
f"'{sender}' does not exist. "
f"Output connections of {sender_component_name} are: "
+ ", ".join([f"{name} (type {_type_name(socket.type)})" for name, socket in sender_sockets.items()])
)
receiver_socket: InputSocket | None = None
if receiver_socket_name:
receiver_socket = receiver_sockets.get(receiver_socket_name)
if not receiver_socket:
raise PipelineConnectError(
f"'{receiver} does not exist. "
f"Input connections of {receiver_component_name} are: "
+ ", ".join(
[f"{name} (type {_type_name(socket.type)})" for name, socket in receiver_sockets.items()]
)
)
# Look for a matching connection among the possible ones.View on GitHub (pinned to e318778c9b)
Solutions
- Read the 'Output connections of X are: ...' list in the error and use one of those exact socket names
- Inspect the sender's run() @component.output_types to see valid socket names
- Check haystack changelog if a component's output names changed between versions
- Drop the '.socket' suffix and let Haystack auto-match if only one output exists
Example fix
// before
pipeline.connect('llm.replie', 'prompt_builder')
// after
pipeline.connect('llm.replies', 'prompt_builder') Defensive patterns
Strategy: validation
Validate before calling
comp = pipeline.get_component(sender)
valid = set(comp.__haystack_output__._sockets_dict)
assert socket_name in valid, f"{socket_name!r} not an output of {sender}; valid: {valid}" Type guard
def output_exists(pipeline, sender: str, socket: str) -> bool:
return socket in pipeline.get_component(sender).__haystack_output__._sockets_dict Try / catch
try:
pipeline.connect(f'{sender}.{socket}', receiver)
except PipelineConnectError as e:
logger.error('%s; valid outputs listed in error: %s', e, e) Prevention
- Read the available output names from the error message
- Check the component's @component.output_types declaration
- Pin haystack versions and review changelogs for socket renames
When it happens
Trigger: Calling pipeline.connect('sender.wrong_socket', 'receiver') where 'wrong_socket' is not a key in the sender's output_sockets dict, usually a typo or an outdated socket name.
Common situations: Typo in the socket name; assuming a socket name that differs from the dict key returned by run(); library upgrade changed a component's output socket names; auto-generated type names like 'documents' vs 'replies'.
Related errors
- '${receiver} does not exist. Input connections of ${receiver
- MarkdownHeaderSplitter only works with text documents but co
- Missing 'type' in component '{name}'
- Successfully imported module '{module}' but couldn't find '{
- Component '{component_type}' (name: '{name}') not imported.
AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30).
Data as JSON: /api/errors/6fe4d473b40fbba6.
Report an issue: GitHub.