langflow-ai/langflow · error · HTTPException
Error previewing chunks.
Error message
Error previewing chunks.
What it means
Error "Error previewing chunks." thrown in langflow-ai/langflow.
Source
Thrown at src/backend/base/langflow/api/v1/knowledge_bases.py:992
"preview_chunks": preview_chunks,
}
)
except (OSError, ValueError, TypeError) as file_error:
logger.warning("Error previewing file %s: %s", uploaded_file.filename, file_error)
file_previews.append(
{
"file_name": uploaded_file.filename or "unknown",
"total_chunks": 0,
"preview_chunks": [],
}
)
except HTTPException:
raise
except Exception as e:
await logger.aerror("Error previewing chunks: %s", e)
raise HTTPException(status_code=500, detail="Error previewing chunks.") from e
else:
return {"files": file_previews}
@router.post("/{kb_name}/ingest", status_code=HTTPStatus.OK, dependencies=[Depends(_check_memory_base_association)])
async def ingest_files_to_knowledge_base(
kb_name: str,
current_user: CurrentActiveUser,
files: Annotated[list[UploadFile], File(description="Files to ingest into the knowledge base")],
source_name: Annotated[str, Form()] = "",
# Mirrors the bounds on ``preview_chunks`` so ingestion can't be
# used to bypass the memory-footprint cap.
chunk_size: Annotated[int, Form(ge=MIN_CHUNK_SIZE, le=MAX_CHUNK_SIZE)] = 1000,
chunk_overlap: Annotated[int, Form(ge=MIN_CHUNK_OVERLAP, le=MAX_CHUNK_OVERLAP)] = 200,
separator: Annotated[str, Form()] = "",
column_config: Annotated[str, Form()] = "",
metadata: Annotated[
str,View on GitHub (pinned to 976ec789d2)
Solutions
- Verify the file and embedding configuration, then retry the chunk preview.
- Check server logs for the underlying ingestion error.
When it happens
Trigger: Occurs when an exception is raised while generating chunk previews for a knowledge base ingestion request.
Common situations: See trigger scenarios.
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/7f70ea8e65956dc2.
Report an issue: GitHub.