run-llama/llama_index · error · ValueError
Component {component} is not a supported data source compone
Error message
Component {component} is not a supported data source component. What it means
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.
Source
Thrown at llama-index-core/llama_index/core/ingestion/data_sources.py:58
return Path(self.file_path).name
@classmethod
def class_name(cls) -> str:
return "DocumentGroup"
def lazy_load_data(self, *args: Any, **load_kwargs: Any) -> Iterable[Document]:
"""Load data from the input directory lazily."""
return self.documents
class ConfigurableComponent(Enum):
@classmethod
def from_component(cls, component: BaseComponent) -> "ConfigurableComponent":
component_class = type(component)
for component_type in cls:
if component_type.value.component_type == component_class:
return component_type
raise ValueError(
f"Component {component} is not a supported data source component."
)
def build_configured_data_source(
self, component: BaseComponent, name: Optional[str] = None
) -> "ConfiguredDataSource":
component_type = self.value.component_type
if not isinstance(component, component_type):
raise ValueError(
f"The enum value {self} is not compatible with component of "
f"type {type(component)}"
)
elif isinstance(component, BasePydanticReader):
reader_config = ReaderConfig(reader=component)
return ConfiguredDataSource[ReaderConfig](component=reader_config) # type: ignore
if isinstance(component, DocumentGroup) and name is None:
# if the component is a DocumentGroup, we want to use theView on GitHub (pinned to afd0fef371)
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.
Example fix
# before member = ConfigurableComponent.from_component(my_custom_reader) # raises # after: wrap directly without the enum from llama_index.core.ingestion.data_sources import ReaderConfig, ConfiguredDataSource cfg = ReaderConfig(reader=my_custom_reader) ds = ConfiguredDataSource[ReaderConfig](component=cfg)
Defensive patterns
Strategy: type-guard
Validate before calling
from llama_index.core.ingestion.data_sources import ConfigurableComponent
def is_supported_data_source(component) -> bool:
return any(m.value.component_type == type(component) for m in ConfigurableComponent) Type guard
def is_supported_data_source(component: BaseComponent) -> bool:
return any(m.value.component_type == type(component) for m in ConfigurableComponent) Try / catch
try:
member = ConfigurableComponent.from_component(reader)
except ValueError:
# fall back to direct ConfiguredDataSource construction for custom readers
from llama_index.core.ingestion.data_sources import ReaderConfig, ConfiguredDataSource
ds = ConfiguredDataSource[ReaderConfig](component=ReaderConfig(reader=reader)) Prevention
- 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
When it happens
Trigger: 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()).
Common situations: 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.
Related errors
- Component {component} is not a supported data sink component
- The enum value {self} is not compatible with component of ty
- Component {component} is not a supported transformation comp
- The enum value {self} is not compatible with component of ty
- Invalid docstore strategy: {effective_strategy}
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/71b4fa630cd884b1.
Report an issue: GitHub.