{"record":{"id":"3f49e1704af891c6","repo":"deepset-ai/haystack","slug":"component-named-receiver-component-name-not-foun","errorCode":null,"errorMessage":"Component named {receiver_component_name} not found in the pipeline.","messagePattern":"Component named (.+?) not found in the pipeline\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":630,"sourceCode":"            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(\n                    f\"'{sender}' does not exist. \"\n                    f\"Output connections of {sender_component_name} are: \"\n                    + \", \".join([f\"{name} (type {_type_name(socket.type)})\" for name, socket in sender_sockets.items()])\n                )","sourceCodeStart":612,"sourceCodeEnd":648,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L612-L648","documentation":"Pipeline.connect() raises ValueError when the receiver component name is not a node in the pipeline graph. The lookup `self.graph.nodes[receiver_component_name]['input_sockets']` raises KeyError, which is re-raised as a ValueError. It means the second argument to connect() references a component that was never added via pipeline.add_component().","triggerScenarios":"Calling pipeline.connect('sender', 'receiver') where 'receiver' was never added, or a typo in the receiver name, or the component was removed with remove_component() before connecting.","commonSituations":"Typos in component names; refactoring/renaming a component string; forgetting to add a component (especially in loops or conditional code); connecting components across two different pipeline instances.","solutions":["Add the receiver component first: pipeline.add_component('receiver', SomeComponent())","Print pipeline.list_component_names() (or the graph nodes) and fix the receiver name in connect()","Check for typos or string interpolation errors in the receiver name","Verify you are using the same Pipeline instance for both add_component and connect"],"exampleFix":"// before\npipeline = Pipeline()\npipeline.add_component('retriever', InMemoryEmbeddingRetriever(embedding_retriever))\npipeline.connect('retriever', 'writter')  # typo\n// after\npipeline.add_component('writer', TextWriter())\npipeline.connect('retriever', 'writer')","handlingStrategy":"validation","validationCode":"names = pipeline.list_component_names()\nassert receiver_name in names, f\"{receiver_name!r} not in pipeline; available: {names}\"\npipeline.connect(sender_name, receiver_name)","typeGuard":"def has_component(pipeline, name: str) -> bool:\n    return name in pipeline.list_component_names()","tryCatchPattern":"try:\n    pipeline.connect(sender, receiver)\nexcept ValueError as e:\n    logger.error('Connect failed: %s; components: %s', e, pipeline.list_component_names())","preventionTips":["Use constants or variables for component names instead of raw strings","Call pipeline.add_component for every component before any connect call","Print pipeline.list_component_names() when debugging","Avoid typos with a small factory that registers and returns names"],"tags":["pipeline","haystack","missing-component","valueerror"],"backgroundTag":"pipeline-component-not-found","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}