Skip to content

Bug: File Upload Shows “Index Failed” for Supported Formats (DOCX, XLSX) #1522

Closed

Description

@mdabdulkarimqa456-code

What happened?

Uploading supported file formats like .docx and .xlsx results in an “Index failed” error, preventing document processing and usage in chat.

Steps to reproduce

  1. Go to Chat
  2. Attach a .docx or .xlsx file
  3. Wait for upload & indexing

Expected behavior

  1. File should be successfully indexed
  2. Content should be searchable and usable in chat

Affected service

Platform

Version or commit

No response

Browser and OS

No response

Relevant log output

Screenshots or recordings

No response

Before submitting

  • I searched existing issues and this hasn't been reported yet.

Activity

  1. yannickmonney commented on May 31, 2026

    @yannickmonney
    Contributor

    Triaged. DOCX and XLSX are supported by the RAG indexer (.docx via python-docx, .xlsx via openpyxl), so "Index failed" for these isn't a missing-format gap — it points to a runtime cause. The usual culprits are: the RAG service being unreachable, an embedding-provider error, a corrupt/empty file, or the secret-scanner rejecting the file.

    To diagnose, could you share a sample failing .docx/.xlsx (or its characteristics) and the RAG service logs around the failure (docker logs for the rag container)? Downgrading priority from high to medium pending repro data. Assigned to me; leaving open.

  2. added
    priority: medium
    service: rag
    and removed
    priority: high
    on May 31, 2026
  3. yannickmonney commented on Jun 1, 2026

    @yannickmonney
    Contributor

    Needs investigation in the RAG service. "Index Failed" for supported DOCX/XLSX is a server-side parsing/indexing failure (services/rag/app/routers/documents.py + the extraction pipeline), distinct from upload validation. To pin it I need the rag-service error logs for a failing DOCX/XLSX (which extractor raised, and on which file). Related indexing reports: #1457. Will trace against the extraction pipeline once a failing sample + log is available; keeping assigned.

  4. yannickmonney commented on Jun 1, 2026

    @yannickmonney
    Contributor

    For the record, confirming the code analysis: DOCX and XLSX are supported end-to-end. They're in SUPPORTED_EXTENSIONS (services/rag/app/routers/documents.py) and routed to dedicated extractors (packages/tale_knowledge/.../extraction/router.py → docx.py via python-docx, xlsx.py via openpyxl). The "Index failed" badge is produced when _background_ingest catches an exception from rag_service.add_document and records status='failed' — so this is a server-side ingestion failure (corrupt/empty file, embedding-provider error, RAG service unreachable, or secret-scanner rejection), not a missing-format or upload-validation issue.

    To unblock diagnosis, please attach the failing sample .docx/.xlsx and the rag container logs around the failure (which extractor raised). Tracking alongside #1457 (same "Index failed" symptom for PDF). Keeping open.

  5. yannickmonney commented on Jun 2, 2026

    @yannickmonney
    Contributor

    Traced the extraction path end-to-end at the code level — the obvious suspects are all clean, so this is a runtime failure that needs the captured error to localize. What I verified:

    • Upload is accepted. services/rag/app/routers/documents.py SUPPORTED_EXTENSIONS includes .docx and .xlsx (and the 400 "unsupported extension" path is not hit).
    • Routing is correct. tale_knowledge/extraction/router.py dispatches .docx → extract_text_from_docx_bytes and .xlsx → extract_text_from_xlsx_bytes, and both return the tuple shape the router expects.
    • Dependencies are present. python-docx, openpyxl, and python-pptx are core [project].dependencies of tale_knowledge (not an optional extra), and services/rag depends on tale-knowledge — so they're in the image.

    Since both Office formats fail together while PDF/text presumably index fine, the failure is downstream of routing — most likely an exception during extraction or the chunk→embed step, which documents.py::_record_failure catches and stores in the documents.error column (surfaced to the UI as the file's ragError / the "Index failed" badge).

    To localize, we need that stored error, which the report didn't include. Could you grab one of:

    • the error column for a failed row (SELECT filename, status, error FROM <schema>.documents WHERE status = 'failed' ORDER BY ... LIMIT 5;), or
    • the tale-rag container logs around the upload (look for the _record_failure / extraction warning).

    With that string I can pin the exact line. Leaving open pending the error output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugpriority: mediumservice: platformservice: rag

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions