[GH-ISSUE #17321] issue: Upload file got NoneType #137967

Closed
opened 2026-05-25 08:57:10 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @vincentzhangz on GitHub (Sep 10, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17321

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Other

Open WebUI Version

v0.6.27

Ollama Version (if applicable)

No response

Operating System

MacOS Sequioa

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using 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 every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

File uploaded and can be read the Model

Actual Behavior

After upload the file it got 'NoneType' object is not iterable

Steps to Reproduce

  1. Open any chat
  2. Upload any file to the chat

Logs & Screenshots

Browser Logs

MessageInput.svelte:633 File upload warning: 'NoneType' object is not iterable
Qe @ MessageInput.svelte:633
await in Qe
(anonymous) @ MessageInput.svelte:780
ct @ MessageInput.svelte:698
Co @ MessageInput.svelte:1014

Kubernetes Logs

2025-09-10 03:49:38.708 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /api/v1/tools/ HTTP/1.1" 200
2025-09-10 03:49:41.995 | INFO     | open_webui.routers.files:upload_file_handler:169 - file.content_type: text/csv
2025-09-10 03:49:42.012 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "POST /api/v1/files/ HTTP/1.1" 200
2025-09-10 03:49:42.017 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /_app/version.json HTTP/1.1" 200
2025-09-10 03:49:42.037 | INFO     | open_webui.routers.retrieval:save_docs_to_vector_db:1221 - save_docs_to_vector_db: document usernames.csv file-007184cb-d169-4679-8b58-2bc9718d4d7d
2025-09-10 03:49:42.041 | INFO     | open_webui.routers.retrieval:save_docs_to_vector_db:1337 - adding to collection file-007184cb-d169-4679-8b58-2bc9718d4d7d
2025-09-10 03:49:42.044 | ERROR    | open_webui.retrieval.utils:generate_ollama_batch_embeddings:878 - Error generating ollama batch embeddings: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)"))
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
           │          └ <function create_connection at 0x75184138f7e0>
           └ <module 'urllib3.util.connection' from '/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py'>
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 60, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
               │      │           │     │     │       │      └ <SocketKind.SOCK_STREAM: 1>
               │      │           │     │     │       └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'>
               │      │           │     │     └ <AddressFamily.AF_UNSPEC: 0>
               │      │           │     └ 11434
               │      │           └ 'open-webui-ollama.openwebui.svc.cluster.local'
               │      └ <function getaddrinfo at 0x751843f3ec00>
               └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'>
  File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               │       │           │     │     │       │     │      └ 0
               │       │           │     │     │       │     └ 0
               │       │           │     │     │       └ <SocketKind.SOCK_STREAM: 1>
               │       │           │     │     └ <AddressFamily.AF_UNSPEC: 0>
               │       │           │     └ 11434
               │       │           └ 'open-webui-ollama.openwebui.svc.cluster.local'
               │       └ <built-in function getaddrinfo>
               └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'>

socket.gaierror: [Errno -2] Name or service not known


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    response = self._make_request(
               │    └ <function HTTPConnectionPool._make_request at 0x7518410eef20>
               └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350>
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 493, in _make_request
    conn.request(
    │    └ <function HTTPConnection.request at 0x7518410c6a20>
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 494, in request
    self.endheaders()
    │    └ <function HTTPConnection.endheaders at 0x751841471300>
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/http/client.py", line 1298, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
    │    │            │                            └ False
    │    │            └ None
    │    └ <function HTTPConnection._send_output at 0x751841470ea0>
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/http/client.py", line 1058, in _send_output
    self.send(msg)
    │    │    └ b'POST /api/embed HTTP/1.1\r\nHost: open-webui-ollama.openwebui.svc.cluster.local:11434\r\nUser-Agent: python-requests/2.32.4...
    │    └ <function HTTPConnection.send at 0x751841470cc0>
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/http/client.py", line 996, in send
    self.connect()
    │    └ <function HTTPConnection.connect at 0x7518410c6480>
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 325, in connect
    self.sock = self._new_conn()
    │    │      │    └ <function HTTPConnection._new_conn at 0x7518410c6340>
    │    │      └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
    │    └ None
    └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 205, in _new_conn
    raise NameResolutionError(self.host, self, e) from e
          │                   │    │     └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
          │                   │    └ <property object at 0x7518410e8680>
          │                   └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>
          └ <class 'urllib3.exceptions.NameResolutionError'>

urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           │    └ <function HTTPConnectionPool.urlopen at 0x7518410ef100>
           └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350>
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen
    retries = retries.increment(
              │       └ <function Retry.increment at 0x75184106a5c0>
              └ Retry(total=0, connect=None, read=False, redirect=None, status=None)
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
          │             │      │    │            └ NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openw...
          │             │      │    └ NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openw...
          │             │      └ '/api/embed'
          │             └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350>
          └ <class 'urllib3.exceptions.MaxRetryError'>

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)"))


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x75184421c9a0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7517f03fd9e0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7517eb5735c0>

  File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file
    process_file(request, ProcessFileForm(file_id=file_item.id), user=user)
    │            │        │                       │         │         └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role...
    │            │        │                       │         └ '007184cb-d169-4679-8b58-2bc9718d4d7d'
    │            │        │                       └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use...
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7517efbec950>
    └ <function process_file at 0x7517f518b560>

  File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7517f518a700>

  File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db
    embeddings = embedding_function(
                 └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0>

  File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda>
    return lambda query, prefix=None, user=None: generate_multiple(
                  │                              └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0>
                  └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi']

  File "/app/backend/open_webui/retrieval/utils.py", line 436, in generate_multiple
    func(
    └ <function get_embedding_function.<locals>.<lambda> at 0x7517efb476a0>

  File "/app/backend/open_webui/retrieval/utils.py", line 420, in <lambda>
    func = lambda query, prefix=None, user=None: generate_embeddings(
                  │                              └ <function generate_embeddings at 0x7517f518a660>
                  └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi']

  File "/app/backend/open_webui/retrieval/utils.py", line 900, in generate_embeddings
    embeddings = generate_ollama_batch_embeddings(
                 └ <function generate_ollama_batch_embeddings at 0x7517f518a5c0>

> File "/app/backend/open_webui/retrieval/utils.py", line 852, in generate_ollama_batch_embeddings
    r = requests.post(
        │        └ <function post at 0x751840e01120>
        └ <module 'requests' from '/usr/local/lib/python3.11/site-packages/requests/__init__.py'>

  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           │               │         │          │       └ {'headers': {'Content-Type': 'application/json', 'Authorization': 'Bearer '}}
           │               │         │          └ {'input': ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'], 'model': 'nomic-embed-text:latest'}
           │               │         └ None
           │               └ 'http://open-webui-ollama.openwebui.svc.cluster.local:11434/api/embed'
           └ <function request at 0x751840d93420>
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           │       │              │           │      └ {'data': None, 'json': {'input': ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'], 'model': 'nomic-embed...
           │       │              │           └ 'http://open-webui-ollama.openwebui.svc.cluster.local:11434/api/embed'
           │       │              └ 'post'
           │       └ <function Session.request at 0x751840e005e0>
           └ <requests.sessions.Session object at 0x7517eb427d10>
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           │    │    │       └ {'timeout': None, 'allow_redirects': True, 'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None}
           │    │    └ <PreparedRequest [POST]>
           │    └ <function Session.send at 0x751840e00ae0>
           └ <requests.sessions.Session object at 0x7517eb427d10>
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        │       │    │          └ {'timeout': None, 'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None}
        │       │    └ <PreparedRequest [POST]>
        │       └ <function HTTPAdapter.send at 0x751840de7e20>
        └ <requests.adapters.HTTPAdapter object at 0x7517eb7a7b50>
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 700, in send
    raise ConnectionError(e, request=request)
          │                          └ <PreparedRequest [POST]>
          └ <class 'requests.exceptions.ConnectionError'>

requests.exceptions.ConnectionError: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)"))
2025-09-10 03:49:42.049 | ERROR    | open_webui.routers.retrieval:save_docs_to_vector_db:1391 - 'NoneType' object is not iterable
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x75184421c9a0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7517f03fd9e0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7517eb5735c0>

  File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file
    process_file(request, ProcessFileForm(file_id=file_item.id), user=user)
    │            │        │                       │         │         └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role...
    │            │        │                       │         └ '007184cb-d169-4679-8b58-2bc9718d4d7d'
    │            │        │                       └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use...
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7517efbec950>
    └ <function process_file at 0x7517f518b560>

  File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7517f518a700>

> File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db
    embeddings = embedding_function(
                 └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0>

  File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda>
    return lambda query, prefix=None, user=None: generate_multiple(
                  │                              └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0>
                  └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi']

  File "/app/backend/open_webui/retrieval/utils.py", line 435, in generate_multiple
    embeddings.extend(
    │          └ <method 'extend' of 'list' objects>
    └ []

TypeError: 'NoneType' object is not iterable
2025-09-10 03:49:42.050 | ERROR    | open_webui.routers.retrieval:process_file:1593 - 'NoneType' object is not iterable
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x75184421c9a0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7517f03fd9e0>
    └ <WorkerThread(AnyIO worker thread, started 128743264458432)>
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7517eb5735c0>

  File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file
    process_file(request, ProcessFileForm(file_id=file_item.id), user=user)
    │            │        │                       │         │         └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role...
    │            │        │                       │         └ '007184cb-d169-4679-8b58-2bc9718d4d7d'
    │            │        │                       └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use...
    │            │        └ <class 'open_webui.routers.retrieval.ProcessFileForm'>
    │            └ <starlette.requests.Request object at 0x7517efbec950>
    └ <function process_file at 0x7517f518b560>

> File "/app/backend/open_webui/routers/retrieval.py", line 1583, in process_file
    raise e
          └ TypeError("'NoneType' object is not iterable")

  File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file
    result = save_docs_to_vector_db(
             └ <function save_docs_to_vector_db at 0x7517f518a700>

  File "/app/backend/open_webui/routers/retrieval.py", line 1392, in save_docs_to_vector_db
    raise e

  File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db
    embeddings = embedding_function(
                 └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0>

  File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda>
    return lambda query, prefix=None, user=None: generate_multiple(
                  │                              └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0>
                  └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi']

  File "/app/backend/open_webui/retrieval/utils.py", line 435, in generate_multiple
    embeddings.extend(
    │          └ <method 'extend' of 'list' objects>
    └ []

TypeError: 'NoneType' object is not iterable
2025-09-10 03:49:42.052 | ERROR    | open_webui.routers.files:process_uploaded_file:129 - Error processing file: 007184cb-d169-4679-8b58-2bc9718d4d7d
2025-09-10 03:49:42.079 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /api/v1/files/007184cb-d169-4679-8b58-2bc9718d4d7d/process/status?stream=true HTTP/1.1" 200
2025-09-10 03:50:42.187 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 103.24.105.122:0 - "GET /_app/version.json HTTP/1.1" 200
2025-09-10 03:52:27.100 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 103.24.105.122:0 - "GET /_app/version.json HTTP/1.1" 200
2025-09-10 03:53:27.105 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /_app/version.json HTTP/1.1" 200

Additional Information

No response

Originally created by @vincentzhangz on GitHub (Sep 10, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17321 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Other ### Open WebUI Version v0.6.27 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS Sequioa ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using 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 every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior File uploaded and can be read the Model ### Actual Behavior After upload the file it got 'NoneType' object is not iterable ### Steps to Reproduce 1. Open any chat 2. Upload any file to the chat ### Logs & Screenshots Browser Logs ``` MessageInput.svelte:633 File upload warning: 'NoneType' object is not iterable Qe @ MessageInput.svelte:633 await in Qe (anonymous) @ MessageInput.svelte:780 ct @ MessageInput.svelte:698 Co @ MessageInput.svelte:1014 ``` Kubernetes Logs ``` 2025-09-10 03:49:38.708 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /api/v1/tools/ HTTP/1.1" 200 2025-09-10 03:49:41.995 | INFO | open_webui.routers.files:upload_file_handler:169 - file.content_type: text/csv 2025-09-10 03:49:42.012 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "POST /api/v1/files/ HTTP/1.1" 200 2025-09-10 03:49:42.017 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /_app/version.json HTTP/1.1" 200 2025-09-10 03:49:42.037 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1221 - save_docs_to_vector_db: document usernames.csv file-007184cb-d169-4679-8b58-2bc9718d4d7d 2025-09-10 03:49:42.041 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1337 - adding to collection file-007184cb-d169-4679-8b58-2bc9718d4d7d 2025-09-10 03:49:42.044 | ERROR | open_webui.retrieval.utils:generate_ollama_batch_embeddings:878 - Error generating ollama batch embeddings: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)")) Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( │ └ <function create_connection at 0x75184138f7e0> └ <module 'urllib3.util.connection' from '/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py'> File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): │ │ │ │ │ │ └ <SocketKind.SOCK_STREAM: 1> │ │ │ │ │ └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'> │ │ │ │ └ <AddressFamily.AF_UNSPEC: 0> │ │ │ └ 11434 │ │ └ 'open-webui-ollama.openwebui.svc.cluster.local' │ └ <function getaddrinfo at 0x751843f3ec00> └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'> File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): │ │ │ │ │ │ │ └ 0 │ │ │ │ │ │ └ 0 │ │ │ │ │ └ <SocketKind.SOCK_STREAM: 1> │ │ │ │ └ <AddressFamily.AF_UNSPEC: 0> │ │ │ └ 11434 │ │ └ 'open-webui-ollama.openwebui.svc.cluster.local' │ └ <built-in function getaddrinfo> └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'> socket.gaierror: [Errno -2] Name or service not known The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( │ └ <function HTTPConnectionPool._make_request at 0x7518410eef20> └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350> File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( │ └ <function HTTPConnection.request at 0x7518410c6a20> └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 494, in request self.endheaders() │ └ <function HTTPConnection.endheaders at 0x751841471300> └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/http/client.py", line 1298, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) │ │ │ └ False │ │ └ None │ └ <function HTTPConnection._send_output at 0x751841470ea0> └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/http/client.py", line 1058, in _send_output self.send(msg) │ │ └ b'POST /api/embed HTTP/1.1\r\nHost: open-webui-ollama.openwebui.svc.cluster.local:11434\r\nUser-Agent: python-requests/2.32.4... │ └ <function HTTPConnection.send at 0x751841470cc0> └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/http/client.py", line 996, in send self.connect() │ └ <function HTTPConnection.connect at 0x7518410c6480> └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 325, in connect self.sock = self._new_conn() │ │ │ └ <function HTTPConnection._new_conn at 0x7518410c6340> │ │ └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> │ └ None └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 205, in _new_conn raise NameResolutionError(self.host, self, e) from e │ │ │ └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> │ │ └ <property object at 0x7518410e8680> │ └ <urllib3.connection.HTTPConnection object at 0x7517eb7578d0> └ <class 'urllib3.exceptions.NameResolutionError'> urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( │ └ <function HTTPConnectionPool.urlopen at 0x7518410ef100> └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350> File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( │ └ <function Retry.increment at 0x75184106a5c0> └ Retry(total=0, connect=None, read=False, redirect=None, status=None) File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] │ │ │ │ └ NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openw... │ │ │ └ NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openw... │ │ └ '/api/embed' │ └ <urllib3.connectionpool.HTTPConnectionPool object at 0x7517eb757350> └ <class 'urllib3.exceptions.MaxRetryError'> urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)")) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x75184421c9a0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7517f03fd9e0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7517eb5735c0> File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file process_file(request, ProcessFileForm(file_id=file_item.id), user=user) │ │ │ │ │ └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role... │ │ │ │ └ '007184cb-d169-4679-8b58-2bc9718d4d7d' │ │ │ └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use... │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7517efbec950> └ <function process_file at 0x7517f518b560> File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7517f518a700> File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db embeddings = embedding_function( └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0> File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda> return lambda query, prefix=None, user=None: generate_multiple( │ └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0> └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'] File "/app/backend/open_webui/retrieval/utils.py", line 436, in generate_multiple func( └ <function get_embedding_function.<locals>.<lambda> at 0x7517efb476a0> File "/app/backend/open_webui/retrieval/utils.py", line 420, in <lambda> func = lambda query, prefix=None, user=None: generate_embeddings( │ └ <function generate_embeddings at 0x7517f518a660> └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'] File "/app/backend/open_webui/retrieval/utils.py", line 900, in generate_embeddings embeddings = generate_ollama_batch_embeddings( └ <function generate_ollama_batch_embeddings at 0x7517f518a5c0> > File "/app/backend/open_webui/retrieval/utils.py", line 852, in generate_ollama_batch_embeddings r = requests.post( │ └ <function post at 0x751840e01120> └ <module 'requests' from '/usr/local/lib/python3.11/site-packages/requests/__init__.py'> File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) │ │ │ │ └ {'headers': {'Content-Type': 'application/json', 'Authorization': 'Bearer '}} │ │ │ └ {'input': ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'], 'model': 'nomic-embed-text:latest'} │ │ └ None │ └ 'http://open-webui-ollama.openwebui.svc.cluster.local:11434/api/embed' └ <function request at 0x751840d93420> File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) │ │ │ │ └ {'data': None, 'json': {'input': ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'], 'model': 'nomic-embed... │ │ │ └ 'http://open-webui-ollama.openwebui.svc.cluster.local:11434/api/embed' │ │ └ 'post' │ └ <function Session.request at 0x751840e005e0> └ <requests.sessions.Session object at 0x7517eb427d10> File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) │ │ │ └ {'timeout': None, 'allow_redirects': True, 'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None} │ │ └ <PreparedRequest [POST]> │ └ <function Session.send at 0x751840e00ae0> └ <requests.sessions.Session object at 0x7517eb427d10> File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) │ │ │ └ {'timeout': None, 'proxies': OrderedDict(), 'stream': False, 'verify': True, 'cert': None} │ │ └ <PreparedRequest [POST]> │ └ <function HTTPAdapter.send at 0x751840de7e20> └ <requests.adapters.HTTPAdapter object at 0x7517eb7a7b50> File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) │ └ <PreparedRequest [POST]> └ <class 'requests.exceptions.ConnectionError'> requests.exceptions.ConnectionError: HTTPConnectionPool(host='open-webui-ollama.openwebui.svc.cluster.local', port=11434): Max retries exceeded with url: /api/embed (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7517eb7578d0>: Failed to resolve 'open-webui-ollama.openwebui.svc.cluster.local' ([Errno -2] Name or service not known)")) 2025-09-10 03:49:42.049 | ERROR | open_webui.routers.retrieval:save_docs_to_vector_db:1391 - 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x75184421c9a0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7517f03fd9e0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7517eb5735c0> File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file process_file(request, ProcessFileForm(file_id=file_item.id), user=user) │ │ │ │ │ └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role... │ │ │ │ └ '007184cb-d169-4679-8b58-2bc9718d4d7d' │ │ │ └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use... │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7517efbec950> └ <function process_file at 0x7517f518b560> File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7517f518a700> > File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db embeddings = embedding_function( └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0> File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda> return lambda query, prefix=None, user=None: generate_multiple( │ └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0> └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'] File "/app/backend/open_webui/retrieval/utils.py", line 435, in generate_multiple embeddings.extend( │ └ <method 'extend' of 'list' objects> └ [] TypeError: 'NoneType' object is not iterable 2025-09-10 03:49:42.050 | ERROR | open_webui.routers.retrieval:process_file:1593 - 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x75184421c9a0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7517f03fd9e0> └ <WorkerThread(AnyIO worker thread, started 128743264458432)> File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function process_uploaded_file at 0x7517fa12ba60>, <starlette.requests.Request object at 0x7517efbec950>, ... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7517eb5735c0> File "/app/backend/open_webui/routers/files.py", line 117, in process_uploaded_file process_file(request, ProcessFileForm(file_id=file_item.id), user=user) │ │ │ │ │ └ UserModel(id='158a915d-ef35-49d3-bbf8-015e3c734c0b', name='Vincent', email='vincentzhangz6769@gmail.com', username=None, role... │ │ │ │ └ '007184cb-d169-4679-8b58-2bc9718d4d7d' │ │ │ └ FileModel(id='007184cb-d169-4679-8b58-2bc9718d4d7d', user_id='158a915d-ef35-49d3-bbf8-015e3c734c0b', hash=None, filename='use... │ │ └ <class 'open_webui.routers.retrieval.ProcessFileForm'> │ └ <starlette.requests.Request object at 0x7517efbec950> └ <function process_file at 0x7517f518b560> > File "/app/backend/open_webui/routers/retrieval.py", line 1583, in process_file raise e └ TypeError("'NoneType' object is not iterable") File "/app/backend/open_webui/routers/retrieval.py", line 1555, in process_file result = save_docs_to_vector_db( └ <function save_docs_to_vector_db at 0x7517f518a700> File "/app/backend/open_webui/routers/retrieval.py", line 1392, in save_docs_to_vector_db raise e File "/app/backend/open_webui/routers/retrieval.py", line 1368, in save_docs_to_vector_db embeddings = embedding_function( └ <function get_embedding_function.<locals>.<lambda> at 0x7517eff1e5c0> File "/app/backend/open_webui/retrieval/utils.py", line 446, in <lambda> return lambda query, prefix=None, user=None: generate_multiple( │ └ <function get_embedding_function.<locals>.generate_multiple at 0x7517eff1f4c0> └ ['username shopee_id jasmine_jacintha edward.chowandy mikaelsetiadi'] File "/app/backend/open_webui/retrieval/utils.py", line 435, in generate_multiple embeddings.extend( │ └ <method 'extend' of 'list' objects> └ [] TypeError: 'NoneType' object is not iterable 2025-09-10 03:49:42.052 | ERROR | open_webui.routers.files:process_uploaded_file:129 - Error processing file: 007184cb-d169-4679-8b58-2bc9718d4d7d 2025-09-10 03:49:42.079 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /api/v1/files/007184cb-d169-4679-8b58-2bc9718d4d7d/process/status?stream=true HTTP/1.1" 200 2025-09-10 03:50:42.187 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 103.24.105.122:0 - "GET /_app/version.json HTTP/1.1" 200 2025-09-10 03:52:27.100 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 103.24.105.122:0 - "GET /_app/version.json HTTP/1.1" 200 2025-09-10 03:53:27.105 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 182.23.1.154:0 - "GET /_app/version.json HTTP/1.1" 200 ``` ### Additional Information _No response_
GiteaMirror added the bug label 2026-05-25 08:57:10 -05:00
Author
Owner

@rgaricano commented on GitHub (Sep 10, 2025):

what Content Extraction Engine do you use?
with what file type are you getting this error?

<!-- gh-comment-id:3273847612 --> @rgaricano commented on GitHub (Sep 10, 2025): what Content Extraction Engine do you use? with what file type are you getting this error?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#137967