deepset-ai/haystack · error · InvalidMappingValueError
Component '{comp_name}' not found in pipeline inputs. Availa
Error message
Component '{comp_name}' not found in pipeline inputs.
Available components: {list(pipeline_inputs.keys())} What it means
The component part of an input_mapping path must exist in the wrapped pipeline's inputs(). If the component name is unknown, InvalidMappingValueError is raised listing available components.
Source
Thrown at haystack/core/super_component/super_component.py:204
Validates the input mapping to ensure that specified components and sockets exist in the pipeline.
:param pipeline_inputs: A dictionary containing pipeline input specifications.
:param input_mapping: A dictionary mapping wrapper input names to pipeline socket paths.
:raises InvalidMappingTypeError:
If the input mapping is of invalid type or contains invalid types.
:raises InvalidMappingValueError:
If the input mapping contains nonexistent components or sockets.
"""
if not isinstance(input_mapping, dict):
raise InvalidMappingTypeError("input_mapping must be a dictionary")
for wrapper_input_name, pipeline_input_paths in input_mapping.items():
if not isinstance(pipeline_input_paths, list):
raise InvalidMappingTypeError(f"Input paths for '{wrapper_input_name}' must be a list of strings.")
for path in pipeline_input_paths:
comp_name, socket_name = self._split_component_path(path)
if comp_name not in pipeline_inputs:
raise InvalidMappingValueError(
f"Component '{comp_name}' not found in pipeline inputs.\n"
f"Available components: {list(pipeline_inputs.keys())}"
)
if socket_name not in pipeline_inputs[comp_name]:
raise InvalidMappingValueError(
f"Input socket '{socket_name}' not found in component '{comp_name}'.\n"
f"Available inputs for '{comp_name}': {list(pipeline_inputs[comp_name].keys())}"
)
def _resolve_input_types_from_mapping(
self, pipeline_inputs: dict[str, dict[str, Any]], input_mapping: dict[str, list[str]]
) -> dict[str, dict[str, Any]]:
"""
Resolves and validates input types based on the provided input mapping.
This function ensures that all mapped pipeline inputs are compatible, consolidating types
when multiple mappings exist. It also determines whether an input is mandatory or has a default value.
View on GitHub (pinned to e318778c9b)
Solutions
- Use the exact component name from pipeline.inputs() in the path
- List available names by printing pipe.inputs().keys() and fix the mapping
Example fix
// before
input_mapping = {"text": ["embedder.text"]} # component is named 'text_embedder'
// after
input_mapping = {"text": ["text_embedder.text"]} Defensive patterns
Strategy: validation
Validate before calling
def check_components(pipe, input_mapping):
available = set(pipe.inputs().keys())
for paths in input_mapping.values():
for p in paths:
comp = p.split(".")[0]
if comp not in available:
raise ValueError(f"'{comp}' not in pipeline components: {sorted(available)}") Type guard
def component_exists(pipe, path: str) -> bool:
return path.split(".")[0] in pipe.inputs() Try / catch
from haystack.core.errors import InvalidMappingValueError
try:
super_comp = SuperComponent(pipeline=pipe, input_mapping=input_mapping)
except InvalidMappingValueError as e:
if "not found in pipeline inputs" in str(e):
print("Available components:", list(pipe.inputs().keys()))
else:
raise Prevention
- Reference component names exactly as passed to pipe.add_component()
- Print pipe.inputs().keys() when authoring mappings
- Update mappings whenever component names change
When it happens
Trigger: input_mapping path references a component name not added to the pipeline, or misspelled, e.g. ["embedder.text"] when the component is named 'text_embedder'.
Common situations: Renaming a component via add_component(name=...) without updating the mapping; typos; copying mappings between pipelines with different component names.
Related errors
- input_mapping must be a dictionary
- Input paths for '{wrapper_input_name}' must be a list of str
- Input socket '{socket_name}' not found in component '{comp_n
- Type conflict for input '{socket_name}' from component '{com
- Pipeline must be provided to SuperComponent.
AI-assisted analysis of deepset-ai/haystack@e318778c9b (2026-08-30).
Data as JSON: /api/errors/3e2844988eb009d2.
Report an issue: GitHub.