[GH-ISSUE #7408] [BUG] AttributeError: 'NoneType' object has no attribute 'ids' when attempting to uploade documents to hosted chromadb #30264

Closed
opened 2026-04-25 04:32:20 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @oatmealm on GitHub (Nov 27, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/7408

Bug Report

Installation Method

Docker

Environment

  • Open WebUI Version: v0.4.6

  • Ollama (if applicable): v0.4.5

  • Operating System: Fedora Linux 41

  • Browser (if applicable): Firefox 132.0.1

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:

When adding documents to a knowledge collection or as attachment to a prompt, I'm expecting to be able to query their content.

Actual Behavior:

LLM can't see attachment, either as collection or direct upload.

Description

Bug Summary:

Documents are not processed when uploaded in either method.

Reproduction Details

Steps to Reproduce:

  1. Start a new chat/prompt
  2. Upload a file
  3. Update the prompt to query the context with "Summarize this document"

Logs and Screenshots

INFO  [open_webui.apps.ollama.main] get_all_models()
ERROR [open_webui.apps.retrieval.utils] Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'ids'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 216, in query_collection_with_hybrid_search
    result = query_doc_with_hybrid_search(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 130, in query_doc_with_hybrid_search
    raise e
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 117, in query_doc_with_hybrid_search
    result = compression_retriever.invoke(query)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 254, in invoke
    raise e
  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 247, in invoke
    result = self._get_relevant_documents(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
    docs = self.base_retriever.invoke(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 118, in invoke
    raise e
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 115, in invoke
    result = self.rank_fusion(input, run_manager=run_manager, config=config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 222, in rank_fusion
    retriever_docs = [
                     ^
  File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 223, in <listcomp>
    retriever.invoke(
  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 254, in invoke
    raise e
  File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 247, in invoke
    result = self._get_relevant_documents(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 46, in _get_relevant_documents
    ids = result.ids[0]
          ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ids'
ERROR [open_webui.apps.retrieval.utils] Error when querying the collection: 'NoneType' object has no attribute 'ids'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 188, in query_collection
    result = query_doc(
             ^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 77, in query_doc
    raise e
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 73, in query_doc
    log.info(f"query_doc:result {result.ids} {result.metadatas}")
                                 ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ids'
ERROR [open_webui.apps.retrieval.utils] Error when querying the collection: 'NoneType' object has no attribute 'ids'
Traceback (most recent call last):
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 188, in query_collection
    result = query_doc(
             ^^^^^^^^^^
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 77, in query_doc
    raise e
  File "/app/backend/open_webui/apps/retrieval/utils.py", line 73, in query_doc
    log.info(f"query_doc:result {result.ids} {result.metadatas}")
                                 ^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ids'
INFO  [open_webui.apps.ollama.main] get_all_models()
'NoneType' object has no attribute 'ids'
'NoneType' object has no attribute 'ids'

Additional Information

Using hosted chromadb without authentication, which is usable from other services I'm running, like anythingllm.

VECTOR_DB=chroma
CHROMA_HTTP_HOST=host.containers.internal
CHROMA_HTTP_PORT=8000
Originally created by @oatmealm on GitHub (Nov 27, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/7408 # Bug Report ## Installation Method Docker ## Environment - **Open WebUI Version:** v0.4.6 - **Ollama (if applicable):** v0.4.5 - **Operating System:** Fedora Linux 41 - **Browser (if applicable):** Firefox 132.0.1 **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: When adding documents to a knowledge collection or as attachment to a prompt, I'm expecting to be able to query their content. ## Actual Behavior: LLM can't see attachment, either as collection or direct upload. ## Description **Bug Summary:** Documents are not processed when uploaded in either method. ## Reproduction Details **Steps to Reproduce:** 1. Start a new chat/prompt 2. Upload a file 3. Update the prompt to query the context with "Summarize this document" ## Logs and Screenshots ``` INFO [open_webui.apps.ollama.main] get_all_models() ERROR [open_webui.apps.retrieval.utils] Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'ids' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/utils.py", line 216, in query_collection_with_hybrid_search result = query_doc_with_hybrid_search( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/utils.py", line 130, in query_doc_with_hybrid_search raise e File "/app/backend/open_webui/apps/retrieval/utils.py", line 117, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 254, in invoke raise e File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 247, in invoke result = self._get_relevant_documents( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents docs = self.base_retriever.invoke( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 118, in invoke raise e File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 115, in invoke result = self.rank_fusion(input, run_manager=run_manager, config=config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 222, in rank_fusion retriever_docs = [ ^ File "/usr/local/lib/python3.11/site-packages/langchain/retrievers/ensemble.py", line 223, in <listcomp> retriever.invoke( File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 254, in invoke raise e File "/usr/local/lib/python3.11/site-packages/langchain_core/retrievers.py", line 247, in invoke result = self._get_relevant_documents( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/utils.py", line 46, in _get_relevant_documents ids = result.ids[0] ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'ids' ERROR [open_webui.apps.retrieval.utils] Error when querying the collection: 'NoneType' object has no attribute 'ids' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/utils.py", line 188, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/utils.py", line 77, in query_doc raise e File "/app/backend/open_webui/apps/retrieval/utils.py", line 73, in query_doc log.info(f"query_doc:result {result.ids} {result.metadatas}") ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'ids' ERROR [open_webui.apps.retrieval.utils] Error when querying the collection: 'NoneType' object has no attribute 'ids' Traceback (most recent call last): File "/app/backend/open_webui/apps/retrieval/utils.py", line 188, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/apps/retrieval/utils.py", line 77, in query_doc raise e File "/app/backend/open_webui/apps/retrieval/utils.py", line 73, in query_doc log.info(f"query_doc:result {result.ids} {result.metadatas}") ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'ids' INFO [open_webui.apps.ollama.main] get_all_models() 'NoneType' object has no attribute 'ids' 'NoneType' object has no attribute 'ids' ``` ## Additional Information Using hosted chromadb without authentication, which is usable from other services I'm running, like anythingllm. ``` VECTOR_DB=chroma CHROMA_HTTP_HOST=host.containers.internal CHROMA_HTTP_PORT=8000 ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#30264