{"record":{"id":"38483e7611d18bb9","repo":"deepset-ai/haystack","slug":"invalid-path-format-path-expected-component","errorCode":null,"errorMessage":"Invalid path format: '{path}'. Expected 'component_name.socket_name'.","messagePattern":"Invalid path format: '(.+?)'\\. Expected 'component_name\\.socket_name'\\.","errorType":"exception","errorClass":"InvalidMappingValueError","httpStatus":null,"severity":"error","filePath":"haystack/core/super_component/super_component.py","lineNumber":179,"sourceCode":"        filtered_inputs = {param: value for param, value in kwargs.items() if value is not _delegate_default}\n        pipeline_inputs = self._map_explicit_inputs(input_mapping=self.input_mapping, inputs=filtered_inputs)\n        pipeline_outputs = await self.pipeline.run_async(data=pipeline_inputs)\n        return self._map_explicit_outputs(pipeline_outputs, self.output_mapping)\n\n    @staticmethod\n    def _split_component_path(path: str) -> tuple[str, str]:\n        \"\"\"\n        Splits a component path into a component name and a socket name.\n\n        :param path: A string in the format \"component_name.socket_name\".\n        :returns:\n            A tuple containing (component_name, socket_name).\n        :raises InvalidMappingValueError:\n            If the path format is incorrect.\n        \"\"\"\n        comp_name, socket_name = parse_connect_string(path)\n        if socket_name is None:\n            raise InvalidMappingValueError(f\"Invalid path format: '{path}'. Expected 'component_name.socket_name'.\")\n        return comp_name, socket_name\n\n    def _validate_input_mapping(\n        self, pipeline_inputs: dict[str, dict[str, Any]], input_mapping: dict[str, list[str]]\n    ) -> None:\n        \"\"\"\n        Validates the input mapping to ensure that specified components and sockets exist in the pipeline.\n\n        :param pipeline_inputs: A dictionary containing pipeline input specifications.\n        :param input_mapping: A dictionary mapping wrapper input names to pipeline socket paths.\n        :raises InvalidMappingTypeError:\n            If the input mapping is of invalid type or contains invalid types.\n        :raises InvalidMappingValueError:\n            If the input mapping contains nonexistent components or sockets.\n        \"\"\"\n        if not isinstance(input_mapping, dict):\n            raise InvalidMappingTypeError(\"input_mapping must be a dictionary\")\n","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/super_component/super_component.py#L161-L197","documentation":"Mapping paths in SuperComponent must be 'component_name.socket_name' strings. _split_component_path uses parse_connect_string and raises InvalidMappingValueError when no socket part is present.","triggerScenarios":"Passing an input_mapping or output_mapping path without a dot, e.g. 'my_component' instead of 'my_component.input', or a path with multiple dots/malformed syntax that yields socket_name None.","commonSituations":"Listing just the component name in a mapping; copy-pasted keys missing the socket suffix; using a socket name containing characters that break the connect-string parser.","solutions":["Use the full 'component_name.socket_name' format in every mapping path","Verify the socket name exists on that component"],"exampleFix":"// before\ninput_mapping = {\"text\": [\"my_embedder\"]}\n// after\ninput_mapping = {\"text\": [\"my_embedder.text\"]}","handlingStrategy":"validation","validationCode":"def validate_paths(mapping: dict) -> None:\n    for paths in mapping.values():\n        for p in (paths if isinstance(paths, list) else [paths]):\n            if not isinstance(p, str) or \".\" not in p:\n                raise ValueError(f\"Path '{p}' must be 'component_name.socket_name'\")","typeGuard":"def is_valid_path(p: object) -> bool:\n    return isinstance(p, str) and p.count(\".\") == 1 and all(part for part in p.split(\".\"))","tryCatchPattern":"from haystack.core.errors import InvalidMappingValueError\ntry:\n    super_comp = SuperComponent(pipeline=pipe, input_mapping=mapping)\nexcept InvalidMappingValueError as e:\n    if \"Invalid path format\" in str(e):\n        print(\"Fix to 'component.socket':\", e)\n    else:\n        raise","preventionTips":["Always include the socket name after the dot in mapping paths","Copy component and socket names from pipeline.inputs()/outputs() output","Add a quick validation helper in your codebase for mapping configs"],"tags":["super-component","mapping","path-format"],"backgroundTag":"invalid-path-format","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}