Free | No tracking | Every fact with a source|German and English

Error / Models and files

Open WebUI: 400: 'NoneType' object has no attribute 'encode' (document embedding model missing)

When uploading a document or adding it to a knowledge base, Open WebUI crashes with this error. The document is not prepared for search (RAG).

The message

400: 'NoneType' object has no attribute 'encode'

Affects: Open WebUI

Why is this happening?

For RAG, Open WebUI converts the text into vectors with an embedding model. If this model is not set up, has not finished downloading, or the external embedding service (for example Ollama) is not reachable, Open WebUI does not get a model back and fails.

How to fix it

  1. Open „Settings > Admin > Documents“ and save the model again under „Embedding Model“, even if it is already selected. This makes Open WebUI check it again and download it if needed.
  2. If you use an external embedding service, check whether it is running and reachable from Open WebUI.
  3. Then upload a document again and check the log to see whether the error message is gone.
  4. If you changed the embedding model, reindex the existing documents: „Settings > Admin > Documents > Reindex Knowledge and Memory Vectors“. Only then will the new embeddings apply.

Better not: Do not change the embedding model without reindexing afterward: Old and new vectors do not match, and document search will then return nothing useful.

Set up from scratch again

If it still doesn’t work after that, a fresh setup step by step often helps:

Terms for this

Similar errors

Sources

Checked on Oct 28, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.