[GH-ISSUE #9695] Why can't the AI recognize the content in the uploaded document? #54278

Closed
opened 2026-05-05 16:04:07 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @a506488043 on GitHub (Feb 9, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9695

Bug Report

Image

Important Notes


Installation Method

I installed OpenWebUI via pip

Environment

  • Open WebUI Version:

Image

Image

  • Ollama (if applicable):

Image

  • Operating System:

Linux My-System 6.8.0-52-generic #53-Ubuntu SMP PREEMPT_DYNAMIC Sat Jan 11 00:06:25 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

  • Browser (if applicable):
    Google Chrome 132.0.6834.196(正式版本) (64 位)

Confirmation:

Image

ERROR [open_webui.retrieval.utils] Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'ids'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 228, in query_collection_with_hybrid_search
result = query_doc_with_hybrid_search(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 137, in query_doc_with_hybrid_search
raise e
File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 124, in query_doc_with_hybrid_search
result = compression_retriever.invoke(query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/langchain_core/retrievers.py", line 259, in invoke
result = self._get_relevant_documents(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents
docs = self.base_retriever.invoke(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/langchain/retrievers/ensemble.py", line 118, in invoke
raise e
File "/usr/local/lib/python3.12/dist-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.12/dist-packages/langchain/retrievers/ensemble.py", line 223, in rank_fusion
retriever.invoke(
File "/usr/local/lib/python3.12/dist-packages/langchain_core/retrievers.py", line 259, in invoke
result = self._get_relevant_documents(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 53, in _get_relevant_documents
ids = result.ids[0]
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'ids'

Expected Behavior:

When referencing a document for a knowledge base;

Image

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @a506488043 on GitHub (Feb 9, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/9695 # Bug Report ![Image](https://github.com/user-attachments/assets/a334f88b-7df0-45b8-baa7-73833bfe00d3) ## Important Notes --- ## Installation Method I installed OpenWebUI via pip ## Environment - **Open WebUI Version:** ![Image](https://github.com/user-attachments/assets/58f93f71-4ac6-4dad-909c-3310b6fbb8d5) ![Image](https://github.com/user-attachments/assets/daef13d6-c917-46de-9606-2987cddeed02) - **Ollama (if applicable):** ![Image](https://github.com/user-attachments/assets/4387e093-aa0f-49e9-9c8c-37e50e848a99) - **Operating System:** Linux My-System 6.8.0-52-generic #53-Ubuntu SMP PREEMPT_DYNAMIC Sat Jan 11 00:06:25 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux - **Browser (if applicable):** Google Chrome 132.0.6834.196(正式版本) (64 位) **Confirmation:** ![Image](https://github.com/user-attachments/assets/67c89d93-509a-45b2-8319-480ddfb8d250) ERROR [open_webui.retrieval.utils] Error when querying the collection with hybrid_search: 'NoneType' object has no attribute 'ids' Traceback (most recent call last): File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 228, in query_collection_with_hybrid_search result = query_doc_with_hybrid_search( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 137, in query_doc_with_hybrid_search raise e File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 124, in query_doc_with_hybrid_search result = compression_retriever.invoke(query) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/langchain/retrievers/contextual_compression.py", line 44, in _get_relevant_documents docs = self.base_retriever.invoke( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/langchain/retrievers/ensemble.py", line 118, in invoke raise e File "/usr/local/lib/python3.12/dist-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.12/dist-packages/langchain/retrievers/ensemble.py", line 223, in rank_fusion retriever.invoke( File "/usr/local/lib/python3.12/dist-packages/langchain_core/retrievers.py", line 259, in invoke result = self._get_relevant_documents( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/dist-packages/open_webui/retrieval/utils.py", line 53, in _get_relevant_documents ids = result.ids[0] ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'ids' ## Expected Behavior: When referencing a document for a knowledge base; ![Image](https://github.com/user-attachments/assets/82b58785-e779-40f2-987c-9835f66ce0bb) ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#54278