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
- 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.
- Trigger embedding/processing for that document (save-and-embed) and retry summarization afterwards.
- 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
- Check Document.content is non-empty before exposing documents to summarizer-capable agents.
- Embed documents at upload time and surface collector failures immediately.
- Keep DB document rows and STORAGE_DIR/documents in sync; treat orphans as missing content.
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
- Access denied - path outside allowed directories.
- Could not find exact match for edit:\n
- Empty content for . Skipping.
- Invalid period: " ". Use "today", "tomorrow", "week", "this…
- MCP server is not currently running
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)