{"record":{"id":"7e8f86d4cf846eae","repo":"deepset-ai/haystack","slug":"component-component-type-name-name-not","errorCode":null,"errorMessage":"Component '{component_type}' (name: '{name}') not imported. Please check that the package is installed and the component path is correct.","messagePattern":"Component '(.+?)' \\(name: '(.+?)'\\) not imported\\. Please check that the package is installed and the component path is correct\\.","errorType":"exception","errorClass":"PipelineError","httpStatus":null,"severity":"error","filePath":"haystack/core/pipeline/base.py","lineNumber":256,"sourceCode":"                if isinstance(component_type, str) and \".\" in component_type:\n                    _check_module_allowed(component_type.rsplit(\".\", 1)[0])\n\n                if component_type not in component.registry:\n                    try:\n                        # Import the module first...\n                        module, _ = component_type.rsplit(\".\", 1)\n                        logger.debug(\"Trying to import module {module_name}\", module_name=module)\n                        type_serialization.thread_safe_import(module)\n                        # ...then try again\n                        if component_type not in component.registry:\n                            raise PipelineError(  # noqa: TRY301\n                                f\"Successfully imported module '{module}' but couldn't find \"\n                                f\"'{component_type}' in the component registry.\\n\"\n                                f\"The component might be registered under a different path. \"\n                                f\"Here are the registered components:\\n {list(component.registry.keys())}\\n\"\n                            )\n                    except (ImportError, PipelineError, ValueError) as e:\n                        raise PipelineError(\n                            f\"Component '{component_type}' (name: '{name}') not imported. Please \"\n                            f\"check that the package is installed and the component path is correct.\"\n                        ) from e\n\n                # Create a new one\n                component_class = component.registry[component_type]\n\n                try:\n                    instance = component_from_dict(component_class, component_data, name, callbacks)\n                except Exception as e:\n                    # Convert to JSON with indentation, truncate if too long\n                    try:\n                        data_str = json.dumps(component_data, default=str, indent=2)\n                    except Exception:\n                        data_str = str(component_data)\n\n                    max_len = 1000\n                    if len(data_str) > max_len:","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/deepset-ai/haystack/blob/e318778c9bf60a1963e3b5f451359655dd696c30/haystack/core/pipeline/base.py#L238-L274","documentation":"The fallback wrapper around component import failures during from_dict: if importing the component's module raises ImportError, PipelineError, or ValueError, Haystack raises this PipelineError indicating the component could not be imported at all. It points at a missing package or an incorrect component path in the serialized pipeline.","triggerScenarios":"from_dict encountering a 'type' whose module doesn't exist (typo in module path), whose package isn't installed (e.g. an integration like haystack.components.extractors requiring uninstalled extras), or which raises ValueError during import.","commonSituations":"Using a pipeline YAML with integration components without pip installing the integration package; typos in the module path; version mismatch where a component moved to a new module; importing a pipeline in a different environment than it was created in.","solutions":["pip install the package that provides the component (e.g. haystack-ai extras or integration packages)","Correct the module path in the pipeline 'type' string","Verify with python -c \"import <module>\" that the module imports in the target environment","Align haystack package versions between the environment that dumped and the one that loads the pipeline"],"exampleFix":"// before\n# yaml uses type: haystack.components.retrievers.inmemory.MyRetriever (doesn't exist)\n\n// after\n# pip install the integration or fix path:\ntype: haystack.components.retrievers.in_memory.InMemoryEmbeddingRetriever","handlingStrategy":"validation","validationCode":"def check_component_imports(data: dict) -> list[str]:\n    errors = []\n    for comp in data.get(\"components\", {}).values():\n        t = comp.get(\"type\", \"\")\n        if isinstance(t, str) and \".\" in t:\n            module = t.rsplit(\".\", 1)[0]\n            try:\n                __import__(module)\n            except ImportError as e:\n                errors.append(f\"{t}: {e}\")\n    return errors","typeGuard":"def component_importable(component_type: str) -> bool:\n    try:\n        __import__(component_type.rsplit(\".\", 1)[0])\n        return True\n    except ImportError:\n        return False","tryCatchPattern":"try:\n    pipe = Pipeline.from_dict(data)\nexcept PipelineError as e:\n    if \"not imported\" in str(e):\n        logging.error(\"Install the missing package or fix the path: %s\", e)\n        raise","preventionTips":["pip install every integration package the pipeline references","Load pipelines in the same environment (and versions) they were dumped in","Test-serialize and reload pipelines in CI","Validate module paths with python -c \"import ...\" before deployment"],"tags":["serialization","import","missing-package","pipeline","haystack"],"backgroundTag":"import-error","analyzedSha":"e318778c9bf60a1963e3b5f451359655dd696c30","analyzedAt":"2026-08-30T11:45:20.711Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}