iflytek/astron-agent · error · Exception
Dataset creation failed
Error message
Dataset creation failed: {create_response} What it means
ensure_dataset raises this when create_dataset returns a non-zero code from the RAGFlow server — the dataset (knowledge group) could not be created, so document ingestion for that group cannot proceed. The message embeds the full create_response for diagnosis.
Solutions
- Inspect the embedded create_response code/message (name conflicts, auth, quota)
- Check RAGFlow service availability and API key validity
- Retry creation; if the name exists, look up the existing dataset instead
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at core/knowledge/infra/ragflow/ragflow_utils.py:136 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/198eb4841ff66394.
Report an issue: GitHub.
Appendix: source
Thrown at core/knowledge/infra/ragflow/ragflow_utils.py:136
)
return dataset_id
logger.info(f"Dataset doesn't exist, creating new dataset: {group}")
create_response = await create_dataset(
name=group,
description=description
or f"Automatically created dataset: {group}",
chunk_method="naive",
)
if create_response.get("code") == 0:
dataset_id = create_response.get("data", {}).get("id")
logger.info(
f"Dataset created successfully: {group}, ID: {dataset_id}"
)
return dataset_id
else:
raise Exception(f"Dataset creation failed: {create_response}")
except Exception as e:
logger.error(f"Dataset management failed: {e}")
raise Exception(f"Unable to ensure dataset exists: {str(e)}")
@staticmethod
async def _sync_description_if_stale(
dataset_id: str, current: Optional[str], desired: Optional[str]
) -> None:
"""Best-effort lazy sync of a dataset's description.
Skips when ``desired`` is empty (caller did not supply a label) or
when ``current`` already matches. Exceptions are swallowed and logged
— a UI-friendly description must never block document writes.
"""
if not desired or current == desired:
return
try:View on GitHub (pinned to 5e758547a8)