[GH-ISSUE #8927] Embedding failure #30856

Closed
opened 2026-04-25 05:02:35 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ghost on GitHub (Jan 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8927

Bug Report

Installation Method

docker

Environment

  • Open WebUI Version: v0.5.7
  • Ollama (if applicable): 0.5.7-0-ga420a45-dirty
  • Operating System: Arch
  • Browser (if applicable): Firefox

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Embedding works for docker container

Actual Behavior:

Embedding failed

Description

Bug Summary:

Reproduction Details

Steps to Reproduce:
Model used: https://huggingface.co/djuna/stella-base-en-v2-Q5_K_M-GGUF
Image

Embeding failed

Logs and Screenshots

Browser Console Logs:

Image

Docker Container Logs:

INFO  [open_webui.routers.files] file.content_type: application/pdf
INFO  [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf file-339d3f4f-79d5-4536-b5fd-c34896a6823a
INFO  [open_webui.routers.retrieval] adding to collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.files] 400: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/files.py", line 74, in upload_file
    process_file(request, ProcessFileForm(file_id=id))
  File "/app/backend/open_webui/routers/retrieval.py", line 962, in process_file
    raise HTTPException(
fastapi.exceptions.HTTPException: 400: 'NoneType' object is not iterable
ERROR [open_webui.routers.files] Error processing file: 339d3f4f-79d5-4536-b5fd-c34896a6823a
Collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a does not exist.
500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed
INFO:     10.0.0.3:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK
INFO  [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf fb5775f5-5291-4a63-9f16-a4b16a28af2f
INFO  [open_webui.routers.retrieval] adding to collection fb5775f5-5291-4a63-9f16-a4b16a28af2f
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
Collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a does not exist.
Collection fb5775f5-5291-4a63-9f16-a4b16a28af2f does not exist.
500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed
INFO:     10.0.0.3:0 - "POST /api/v1/knowledge/fb5775f5-5291-4a63-9f16-a4b16a28af2f/file/add HTTP/1.1" 400 Bad Request
Originally created by @ghost on GitHub (Jan 25, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/8927 # Bug Report ## Installation Method docker ## Environment - **Open WebUI Version:** v0.5.7 - **Ollama (if applicable):** 0.5.7-0-ga420a45-dirty - **Operating System:** Arch - **Browser (if applicable):** Firefox **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Embedding works for docker container ## Actual Behavior: Embedding failed ## Description **Bug Summary:** ## Reproduction Details **Steps to Reproduce:** Model used: https://huggingface.co/djuna/stella-base-en-v2-Q5_K_M-GGUF ![Image](https://github.com/user-attachments/assets/6581c03d-4403-4c47-ac03-df2c24c3c087) Embeding failed ## Logs and Screenshots **Browser Console Logs:** ![Image](https://github.com/user-attachments/assets/5a14545e-5aea-4528-a4a1-2dcea6a1f1f7) **Docker Container Logs:** ```log INFO [open_webui.routers.files] file.content_type: application/pdf INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf file-339d3f4f-79d5-4536-b5fd-c34896a6823a INFO [open_webui.routers.retrieval] adding to collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.files] 400: 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/files.py", line 74, in upload_file process_file(request, ProcessFileForm(file_id=id)) File "/app/backend/open_webui/routers/retrieval.py", line 962, in process_file raise HTTPException( fastapi.exceptions.HTTPException: 400: 'NoneType' object is not iterable ERROR [open_webui.routers.files] Error processing file: 339d3f4f-79d5-4536-b5fd-c34896a6823a Collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a does not exist. 500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed INFO: 10.0.0.3:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf fb5775f5-5291-4a63-9f16-a4b16a28af2f INFO [open_webui.routers.retrieval] adding to collection fb5775f5-5291-4a63-9f16-a4b16a28af2f ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable Collection file-339d3f4f-79d5-4536-b5fd-c34896a6823a does not exist. Collection fb5775f5-5291-4a63-9f16-a4b16a28af2f does not exist. 500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed INFO: 10.0.0.3:0 - "POST /api/v1/knowledge/fb5775f5-5291-4a63-9f16-a4b16a28af2f/file/add HTTP/1.1" 400 Bad Request ```
Author
Owner

@ghost commented on GitHub (Jan 26, 2025):

I changed the vectordb to pgvector (the same pg data base that open webui uses) and I got the following error:

INFO  [open_webui.routers.files] file.content_type: application/pdf
INFO  [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf file-35403e70-d0a6-42e2-8db1-5ea7cf45cd37
INFO  [open_webui.routers.retrieval] adding to collection file-35403e70-d0a6-42e2-8db1-5ea7cf45cd37
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.files] 400: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/backend/open_webui/routers/files.py", line 74, in upload_file
    process_file(request, ProcessFileForm(file_id=id))
  File "/app/backend/open_webui/routers/retrieval.py", line 962, in process_file
    raise HTTPException(
fastapi.exceptions.HTTPException: 400: 'NoneType' object is not iterable
ERROR [open_webui.routers.files] Error processing file: 35403e70-d0a6-42e2-8db1-5ea7cf45cd37
500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed
INFO:     10.0.0.3:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK
INFO  [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf fb5775f5-5291-4a63-9f16-a4b16a28af2f
INFO  [open_webui.routers.retrieval] adding to collection fb5775f5-5291-4a63-9f16-a4b16a28af2f
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file
    result = save_docs_to_vector_db(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db
    raise e
  File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db
    embeddings = embedding_function(
                 ^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda>
    return lambda query: generate_multiple(query, func)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple
    embeddings.extend(func(query[i : i + embedding_batch_size]))
TypeError: 'NoneType' object is not iterable
500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed
INFO:     10.0.0.3:0 - "POST /api/v1/knowledge/fb5775f5-5291-4a63-9f16-a4b16a28af2f/file/add HTTP/1.1" 400 Bad Request
<!-- gh-comment-id:2614182636 --> @ghost commented on GitHub (Jan 26, 2025): I changed the vectordb to pgvector (the same pg data base that open webui uses) and I got the following error: ```log INFO [open_webui.routers.files] file.content_type: application/pdf INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf file-35403e70-d0a6-42e2-8db1-5ea7cf45cd37 INFO [open_webui.routers.retrieval] adding to collection file-35403e70-d0a6-42e2-8db1-5ea7cf45cd37 ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.files] 400: 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/backend/open_webui/routers/files.py", line 74, in upload_file process_file(request, ProcessFileForm(file_id=id)) File "/app/backend/open_webui/routers/retrieval.py", line 962, in process_file raise HTTPException( fastapi.exceptions.HTTPException: 400: 'NoneType' object is not iterable ERROR [open_webui.routers.files] Error processing file: 35403e70-d0a6-42e2-8db1-5ea7cf45cd37 500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed INFO: 10.0.0.3:0 - "POST /api/v1/files/ HTTP/1.1" 200 OK INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document api-guide.pdf fb5775f5-5291-4a63-9f16-a4b16a28af2f INFO [open_webui.routers.retrieval] adding to collection fb5775f5-5291-4a63-9f16-a4b16a28af2f ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable ERROR [open_webui.routers.retrieval] 'NoneType' object is not iterable Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 953, in process_file raise e File "/app/backend/open_webui/routers/retrieval.py", line 926, in process_file result = save_docs_to_vector_db( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/routers/retrieval.py", line 799, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 777, in save_docs_to_vector_db embeddings = embedding_function( ^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 281, in <lambda> return lambda query: generate_multiple(query, func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 276, in generate_multiple embeddings.extend(func(query[i : i + embedding_batch_size])) TypeError: 'NoneType' object is not iterable 500 Server Error: Internal Server Error for url: http://ollama:11434/api/embed INFO: 10.0.0.3:0 - "POST /api/v1/knowledge/fb5775f5-5291-4a63-9f16-a4b16a28af2f/file/add HTTP/1.1" 400 Bad Request ```
Author
Owner

@ChMat commented on GitHub (Jan 26, 2025):

I’m experiencing the same error message within Open Web UI GUI.

Same configuration as OP, I just upgraded from previous versions of Ollama and Open Web UI.

I’m trying to change Embedding model to bge-m3:latest and I get the TypeError: 'NoneType' object is not iterable error when I try to upload files or edit text content into a documentation.

I’m runnings Open Web UI in WSL and using latest version of Chrome as my browser.

Rolling back to the default Embedding model engine (sentence transfomers) makes the error disappear.

<!-- gh-comment-id:2614291027 --> @ChMat commented on GitHub (Jan 26, 2025): I’m experiencing the same error message within Open Web UI GUI. Same configuration as OP, I just upgraded from previous versions of Ollama and Open Web UI. I’m trying to change Embedding model to `bge-m3:latest` and I get the `TypeError: 'NoneType' object is not iterable` error when I try to upload files or edit text content into a documentation. I’m runnings Open Web UI in WSL and using latest version of Chrome as my browser. Rolling back to the default Embedding model engine (sentence transfomers) makes the error disappear.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#30856