mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[GH-ISSUE #24393] bug: PPTX/DOC file processing hangs at status=pending in fresh container — averaged_perceptron_tagger_eng NLTK resource not bundled #91025
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vzd3v on GitHub (May 5, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24393
Summary
Uploading a
.pptx(or any other format that goes throughUnstructuredPowerPointLoader-like loaders) to a freshly built/recreatedopen-webuicontainer leaves the file stuck atstatus=pendingforever. Knowledge-base ingestion silently never advances. Chat works, embeddings work, but RAG document processing is blocked end-to-end.Root cause
unstructured==0.18.31+nltk==3.9.3(both pinned inbackend/requirements.txtonmain,v0.9.1, andv0.9.2) require the language-tagged NLTK resourceaveraged_perceptron_tagger_engfor sentence/POS tagging in PPTX/Word partitioning. NLTK 3.9.x renamed several taggers to add an_engsuffix.The Dockerfile (and
backend/start.sh) bundles onlypunkt_tab:averaged_perceptron_tagger_engis never pre-downloaded. On first PPTX upload after a freshdocker compose up --force-recreate(or a clean image pull),unstructuredraises:Confirmed by direct probe inside the container:
After
python -c "import nltk; nltk.download('averaged_perceptron_tagger_eng', download_dir='/root/nltk_data')", the same probe succeeds in ~1.5s and any subsequent file upload completes within seconds.Why it appears as 'pending' rather than 'failed'
The exception path in
process_uploaded_fileis supposed to setstatus='failed'with the error string, but in practice the file row stays atstatus='pending'(nofailed, nocompleted, no log line at WARN/ERROR), making this look like a silent hang rather than a deterministic failure. The frontend SSE on/api/v1/files/{id}/process/status?stream=truekeeps spinning. Worth a separate look on its own — the exception is being swallowed somewhere in the BackgroundTask/asyncio chain. Reproduces with bothprocess_in_background=trueand inline.Reproduction
ghcr.io/open-webui/open-webui:v0.9.2(orv0.9.1, identical packages)..pptx(e.g. via Knowledge → Upload).data->>'status' = 'pending'indefinitely. No log lines mentioning the file ID after the initialPOST /api/v1/files/?process=true HTTP/1.1 200.Probe to confirm root cause:
Proposed fix
Two parts:
Bundle the missing NLTK resource alongside
punkt_tab. Mirror the existing pattern in both Dockerfile branches (USE_CUDA=trueandelse) and inbackend/start.sh/backend/start_windows.bat:Keeps the airgapped-friendliness improvement from #21165 consistent across the resources
unstructured0.18.x actually needs.Surface the failure. Make sure the
process_uploaded_fileexception path actually transitionsdata->>'status'tofailedwith the original error string indata->>'error'so the UI shows a clear error instead of an infinite spinner. Today the SSE pollsdata->>'status'and never sees a terminal state.Happy to put up a PR for (1) — it's a 3-character diff.
Environment
v0.9.2(andv0.9.1, same deps)unstructured:0.18.31nltk:3.9.3pgvector0.8.2openai-compatible (LiteLLM → GigaChat)@owui-terminator[bot] commented on GitHub (May 5, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
#20107 issue:PPTX not parsed correctly in temporary chat
by mengdeer589 ·
bug#16260 feat: nltk_data taggers and tokenizers to docker image
by artokarj
#17594 issue: Dragging .xlsx file into open-webui triggers punkt_tab not found error
by peuportier ·
bug#16158 issue: Processing does not continue after open_webui.retrieval.utils:generate_openai_batch_embeddings call
by BAngelis ·
bug#4642 bug: upload md file, but got error message 'Resource punkt_tab not found.'
by qaz-t
💡 If this is a duplicate, consider closing it and adding details to the existing issue.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@vzd3v commented on GitHub (May 5, 2026):
Putting up a tightly-scoped fix as #24396 (mirrors #21165 in scope). The status='pending' / silent-swallow part of the symptom is left for a separate fix.
@vzd3v commented on GitHub (May 5, 2026):
PR moved to #24396 — added the required PR-template sections and CLA confirmation that auto-closed #24395. (Earlier #24394 was auto-closed for targeting main.)