{"record":{"id":"71b4fa630cd884b1","repo":"run-llama/llama_index","slug":"component-component-is-not-a-supported-data-sour","errorCode":null,"errorMessage":"Component {component} is not a supported data source component.","messagePattern":"Component (.+?) is not a supported data source component\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/ingestion/data_sources.py","lineNumber":58,"sourceCode":"        return Path(self.file_path).name\n\n    @classmethod\n    def class_name(cls) -> str:\n        return \"DocumentGroup\"\n\n    def lazy_load_data(self, *args: Any, **load_kwargs: Any) -> Iterable[Document]:\n        \"\"\"Load data from the input directory lazily.\"\"\"\n        return self.documents\n\n\nclass ConfigurableComponent(Enum):\n    @classmethod\n    def from_component(cls, component: BaseComponent) -> \"ConfigurableComponent\":\n        component_class = type(component)\n        for component_type in cls:\n            if component_type.value.component_type == component_class:\n                return component_type\n        raise ValueError(\n            f\"Component {component} is not a supported data source component.\"\n        )\n\n    def build_configured_data_source(\n        self, component: BaseComponent, name: Optional[str] = None\n    ) -> \"ConfiguredDataSource\":\n        component_type = self.value.component_type\n        if not isinstance(component, component_type):\n            raise ValueError(\n                f\"The enum value {self} is not compatible with component of \"\n                f\"type {type(component)}\"\n            )\n        elif isinstance(component, BasePydanticReader):\n            reader_config = ReaderConfig(reader=component)\n            return ConfiguredDataSource[ReaderConfig](component=reader_config)  # type: ignore\n\n        if isinstance(component, DocumentGroup) and name is None:\n            # if the component is a DocumentGroup, we want to use the","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/ingestion/data_sources.py#L40-L76","documentation":"Data-source mirror of the data-sink error: ConfigurableComponent.from_component() in data_sources.py raises when the reader/component you passed is not a registered enum member's component_type. The enum is built conditionally by build_configurable_data_source_enum() from the reader packages available in the environment, so unsupported or unavailable readers are rejected here.","triggerScenarios":"Calling ConfigurableComponent.from_component(reader) with a reader whose integration package is not installed, a custom BaseComponent that was never registered, or a subclass of a registered reader (matching is exact on type()).","commonSituations":"Workflow pipelines (llama-index workflow-style ingestion) referencing readers not present in the installed environment; partial dependency installs after a monolithic llama-index -> split-package migration; custom document readers that predate the configurable-component API.","solutions":["Install the reader's integration package (e.g. pip install llama-index-readers-file) so it is included when the enum is built.","Pass the exact registered reader class, not a subclass or wrapper.","For custom readers, bypass the enum and construct ConfiguredDataSource manually (e.g. wrap in ReaderConfig), or extend the enum builder with your component."],"exampleFix":"# before\nmember = ConfigurableComponent.from_component(my_custom_reader)  # raises\n\n# after: wrap directly without the enum\nfrom llama_index.core.ingestion.data_sources import ReaderConfig, ConfiguredDataSource\ncfg = ReaderConfig(reader=my_custom_reader)\nds = ConfiguredDataSource[ReaderConfig](component=cfg)","handlingStrategy":"type-guard","validationCode":"from llama_index.core.ingestion.data_sources import ConfigurableComponent\n\ndef is_supported_data_source(component) -> bool:\n    return any(m.value.component_type == type(component) for m in ConfigurableComponent)","typeGuard":"def is_supported_data_source(component: BaseComponent) -> bool:\n    return any(m.value.component_type == type(component) for m in ConfigurableComponent)","tryCatchPattern":"try:\n    member = ConfigurableComponent.from_component(reader)\nexcept ValueError:\n    # fall back to direct ConfiguredDataSource construction for custom readers\n    from llama_index.core.ingestion.data_sources import ReaderConfig, ConfiguredDataSource\n    ds = ConfiguredDataSource[ReaderConfig](component=ReaderConfig(reader=reader))","preventionTips":["Install reader integrations before building workflow data sources","Use exact reader classes, not subclasses","Wrap custom readers in ReaderConfig directly instead of forcing them through the enum"],"tags":["ingestion","readers","workflow","configuration"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}