{"record":{"id":"c8d83091fb343145","repo":"deepset-ai/haystack","slug":"component-named-sender-component-name-not-found","errorCode":null,"errorMessage":"Component named {sender_component_name} not found in the pipeline.","messagePattern":"Component named (.+?) not found in the pipeline\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":626,"sourceCode":"        :returns:\n            The Pipeline instance.\n\n        :raises PipelineConnectError:\n            If the two components cannot be connected (for example if one of the components is\n            not present in the pipeline, or the connections don't match by type, and so on).\n        \"\"\"\n        # Edges may be named explicitly by passing 'node_name.edge_name' to connect().\n        sender_component_name, sender_socket_name = parse_connect_string(sender)\n        receiver_component_name, receiver_socket_name = parse_connect_string(receiver)\n\n        if sender_component_name == receiver_component_name:\n            raise PipelineConnectError(\"Connecting a Component to itself is not supported.\")\n\n        # Get the nodes data.\n        try:\n            sender_sockets = self.graph.nodes[sender_component_name][\"output_sockets\"]\n        except KeyError as exc:\n            raise ValueError(f\"Component named {sender_component_name} not found in the pipeline.\") from exc\n        try:\n            receiver_sockets = self.graph.nodes[receiver_component_name][\"input_sockets\"]\n        except KeyError as exc:\n            raise ValueError(f\"Component named {receiver_component_name} not found in the pipeline.\") from exc\n\n        if not sender_sockets:\n            raise PipelineConnectError(\n                f\"'{sender_component_name}' does not have any output connections. \"\n                f\"Please check that the output types of '{sender_component_name}.run' are set, \"\n                f\"for example by using the '@component.output_types' decorator.\"\n            )\n\n        # If the name of either socket is given, get the socket\n        sender_socket: OutputSocket | None = None\n        if sender_socket_name:\n            sender_socket = sender_sockets.get(sender_socket_name)\n            if not sender_socket:\n                raise PipelineConnectError(","sourceCodeStart":608,"sourceCodeEnd":644,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L608-L644","documentation":"connect() reads the sender's output_sockets (and then the receiver's input_sockets) from the pipeline graph; if the component name is not a node in the graph, KeyError is converted to ValueError stating the component was not found. This fires before any socket-matching logic runs.","triggerScenarios":"pipe.connect(\"retriver.prompt\", \"llm.prompt\") with a misspelled component name; connecting before the component was added; name case mismatch; connecting components that belong to a different pipeline instance.","commonSituations":"Typos in component names in long connect() chains; refactors renaming components; building connections in config-driven code where names come from external YAML.","solutions":["Add the component first with add_component() using the exact name used in connect()","Fix the spelling/case of the sender (or receiver) name to match the registered name","Validate names before connecting: check both in pipe.graph.nodes"],"exampleFix":"// before\npipe.add_component(\"retriever\", r)\npipe.connect(\"retriver.documents\", \"llm.prompt\")  # typo\n// after\npipe.connect(\"retriever.documents\", \"llm.prompt\")","handlingStrategy":"validation","validationCode":"def is_connectable(pipe, sender: str, receiver: str) -> bool:\n    s, r = sender.split(\".\")[0], receiver.split(\".\")[0]\n    return s in pipe.graph.nodes and r in pipe.graph.nodes","typeGuard":"def component_in_pipeline(pipe, name: str) -> bool:\n    return name in pipe.graph.nodes","tryCatchPattern":"try:\n    pipe.connect(sender, receiver)\nexcept ValueError as e:\n    if \"not found in the pipeline\" in str(e):\n        logger.error(\"Unknown component in connect: %s\", e)\n        raise\n    raise","preventionTips":["Define component names once as constants and reuse them in add/connect calls","Always add_component before connect","Type or validate names coming from external config against the pipeline's registered names"],"tags":["python","pipeline","api-misuse"],"backgroundTag":"unknown-identifier","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}