langflow-ai/langflow · error · HTTPException

Internal error creating knowledge base

Error message

Internal error creating knowledge base

What it means

Error "Internal error creating knowledge base" thrown in langflow-ai/langflow.

Solutions

  1. Check server logs for the underlying error and retry creating the knowledge base.

When it happens

Trigger: Occurs when an unexpected internal exception is raised during knowledge base creation.

Common situations: See trigger scenarios.


AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14). Data as JSON: /api/errors/b58d6be64db147af. Report an issue: GitHub.

Appendix: source

Thrown at src/backend/base/langflow/api/v1/knowledge_bases.py:880

            size=0,
            words=0,
            characters=0,
            chunks=0,
            avg_chunk_size=0.0,
            status="empty",
            column_config=column_config_dicts,
            backend_type=backend_type_value,
            backend_config=backend_config_value,
        )

    except HTTPException:
        raise
    except Exception as e:
        # Clean up if something went wrong
        if kb_path.exists():
            KBStorageHelper.delete_storage(kb_path, kb_name)
        await logger.aerror("Error creating knowledge base: %s", e)
        raise HTTPException(status_code=500, detail="Internal error creating knowledge base") from e


@router.post("/preview-chunks", status_code=HTTPStatus.OK)
async def preview_chunks(
    current_user: CurrentActiveUser,
    files: Annotated[list[UploadFile], File(description="Files to preview chunking for")],
    # Upper bounds cap the memory footprint of a preview request.
    # ``max_chunks * chunk_size * CHUNK_PREVIEW_MULTIPLIER`` is the
    # largest text slice this endpoint will hold in memory — without
    # these bounds, an authenticated user can request gigabytes.
    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()] = "\n",
    max_chunks: Annotated[int, Form(ge=MIN_MAX_CHUNKS, le=MAX_MAX_CHUNKS)] = 5,
) -> dict[str, object]:
    """Preview how files will be chunked without storing anything.

    Uses the same RecursiveCharacterTextSplitter as the ingest endpoint

View on GitHub (pinned to 976ec789d2)