Mintplex-Labs/anything-llm · warning

This document has no readable content that could be found.

Error message

This document has no readable content that could be found.

What it means

Thrown by the summarize plugin when a document exists in the workspace (filename resolves to a docInfo) but Document.content returns null/empty after fetching it by document_id. The plugin refuses to summarize a document whose text was never extracted/stored, so the agent gets an abort instead of a fabricated summary.

Solutions

  1. Open the document in the AnythingLLM UI and verify it shows text; if empty, re-upload or re-save it so the collector extracts content.
  2. Trigger embedding/processing for that document (save-and-embed) and retry summarization afterwards.
  3. Verify storage consistency: document rows in the DB must match files present under STORAGE_DIR/documents.

Example fix

// before
document_summarizer({ filename: "scan.pdf" })  // uploaded but never processed -> throws

// after (process once, then summarize)
await embedAndStoreDocument(workspace, file);  // re-run collector
document_summarizer({ filename: "scan.pdf" })
Defensive patterns

Strategy: validation

Validate before calling

const document = await Document.content(docInfo.document_id);
if (!document?.content || document.content.length === 0) {
  // do not call the summarizer; prompt re-processing instead
  return "Document has no extracted text. Re-upload or re-embed it, then retry summarization.";
}

Type guard

/** @returns {boolean} */
function isSummarizable(doc) {
  return !!doc && typeof doc.content === "string" && doc.content.trim().length > 0;
}

Try / catch

try {
  return await summarizeDocument(docInfo, filename);
} catch (e) {
  if (e.message === "This document has no readable content that could be found.") {
    return `"${filename}" has no extracted text. Embed/process the document first, then ask again.`;
  }
  throw e;
}

Prevention

When it happens

Trigger: The file was uploaded but embedding/processing never ran or failed, leaving document content empty in storage; the document is image/scanned-only with no text layer; the document record was created by an API integration that skipped content extraction; storage dir wiped but DB rows remain.

Common situations: Documents moved to a workspace 'as reference' without being embedded; collector failures during bulk upload; anythingllm storage volume remounted while the database kept old document rows.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/5f92814dc6f0781f. Report an issue: GitHub.

Appendix: source

Thrown at server/utils/agents/aibitat/plugins/summarize.js:133

              const docInfo = availableDocs.find(
                (info) => info.filename === filename
              );
              if (!docInfo) {
                this.super.handlerProps.log(
                  `${this.caller}: No available document by the name "${filename}".`
                );
                return `No available document by the name "${filename}".`;
              }

              const document = await Document.content(docInfo.document_id);
              this.super.introspect(
                `${this.caller}: Grabbing all content for ${
                  filename ?? "a discovered file."
                }`
              );

              if (!document.content || document.content.length === 0) {
                throw new Error(
                  "This document has no readable content that could be found."
                );
              }

              // Report citation for the document being summarized
              this.super.addCitation?.({
                id: docInfo.document_id,
                title: document.title || filename,
                text: document.content,
                chunkSource: null,
                score: null,
              });

              const { TokenManager } = require("../../../helpers/tiktoken");
              if (
                new TokenManager(this.super.model).countFromString(
                  document.content
                ) < Provider.contextLimit(this.super.provider, this.super.model)

View on GitHub (pinned to 3aec848f28)