mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #20732] issue: NoneType has no attribute 'encode' #34806
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 @kmeliksetian on GitHub (Jan 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20732
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.7.2
Ollama Version (if applicable)
No response
Operating System
Debian 13
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Uploading a document to Knowledge / Documents with the default local embedding model sentence-transformers/all-MiniLM-L6-v2 should:
successfully ingest the file
generate embeddings
complete the upload without errors
make the document searchable/usable for RAG
Actual Behavior
When uploading a document, OpenWebUI fails with an exception:
Error: 'NoneType' object has no attribute 'encode'
Upload/ingest aborts and the document is not added.
This looks like the local embedding model is not initialized (encoder is None) during document processing.
Steps to Reproduce
Deploy OpenWebUI (Docker) and open the UI.
Go to Admin Settings → Documents.
Set Embedding model to: sentence-transformers/all-MiniLM-L6-v2
Save the settings.
Go to Documents / Knowledge and try to upload any file (e.g. a PDF or TXT).
Observe the error: 'NoneType' object has no attribute 'encode'
Logs & Screenshots
Additional Information
What I already tried
Based on similar issues and troubleshooting suggestions, I already tried the following without success:
Re-saving the embedding model in Admin Settings → Documents
Forcing a re-download of the model
Switching the embedding provider from local (sentence-transformers) to other providers such as Ollama and OpenAI (which worked)
Switching back from Ollama/OpenAI to the local embedding model
→ the issue persists only with the local default embedding model
@owui-terminator[bot] commented on GitHub (Jan 16, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#17005 issue: 'NoneType' object has no attribute 'encode'
by zic04 • Aug 28, 2025 •
bug#14433 issue: WebSearch does not work - 'NoneType' object has no attribute 'encode'
by yazon • May 28, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@Classic298 commented on GitHub (Jan 16, 2026):
Disable async embedding, cannot Reproduce