mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
issue: A limit type error occurs in Milvus version 2.6.0 #6293
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CHOIBYOUNGHO on GitHub (Sep 1, 2025).
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.6.26
Ollama Version (if applicable)
0.11.8
Operating System
Rocky Linux release 8.9
Browser (if applicable)
Microsoft Edge 139.0.3405.125
Confirmation
README.md.Expected Behavior
After installing Milvus version 2.6.0, when a file is attached and a question is asked about the document's contents, the system should be able to identify what type of document it is.
Actual Behavior
However, the actual response says that the document cannot be viewed.
This issue did not occur with Milvus version 2.5.x
Steps to Reproduce
Install Milvus version 2.6.0.
Enable the hybrid search feature in OpenWebUI and integrate it with Milvus.
Upload a file to the chat window.
Ask what the contents of the uploaded file are.
Logs & Screenshots
Below are the Docker container logs. :
2025-09-01 23:21:23.068 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/files/390d26ab-cdf1-4834-b637-364c222af8ac/process/status?stream=true HTTP/1.1" 200
2025-09-01 23:21:38.128 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1182 - save_docs_to_vector_db: document [1] 회원가입하기.pdf file-390d26ab-cdf1-4834-b637-364c222af8ac
2025-09-01 23:21:38.139 | WARNING | open_webui.retrieval.vector.dbs.milvus:query:198 - Query attempted on non-existent collection: open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac
2025-09-01 23:21:38.139 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1208 - Using token text splitter: cl100k_base
2025-09-01 23:21:38.142 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1298 - adding to collection file-390d26ab-cdf1-4834-b637-364c222af8ac
2025-09-01 23:21:38.544 | INFO | open_webui.retrieval.vector.dbs.milvus:insert:260 - Collection open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac does not exist. Creating now.
2025-09-01 23:21:38.544 | INFO | open_webui.retrieval.vector.dbs.milvus:_create_collection:122 - Using Milvus index type: FLAT, metric type: COSINE
2025-09-01 23:21:38.544 | INFO | open_webui.retrieval.vector.dbs.milvus:_create_collection:135 - Using FLAT index with no specific build-time params.
2025-09-01 23:21:39.693 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/auths/ HTTP/1.1" 200
2025-09-01 23:21:39.711 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "POST /api/v1/chats/new HTTP/1.1" 200
2025-09-01 23:21:39.718 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/auths/ HTTP/1.1" 200
2025-09-01 23:21:39.739 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /favicon.png HTTP/1.1" 200
2025-09-01 23:21:39.796 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-09-01 23:21:39.823 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-09-01 23:21:39.840 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "POST /api/v1/chats/a0da598e-df4f-480f-912f-d69144406655 HTTP/1.1" 200
2025-09-01 23:21:39.858 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-09-01 23:21:39.874 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-09-01 23:21:39.888 | WARNING | open_webui.retrieval.vector.dbs.milvus:get:247 - Fetching ALL items from collection 'open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac'. This might be slow for large collections.
2025-09-01 23:21:39.888 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "POST /api/chat/completions HTTP/1.1" 200
2025-09-01 23:21:39.905 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200
2025-09-01 23:21:39.919 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 20.249.181.82:0 - "GET /api/v1/folders/ HTTP/1.1" 200
2025-09-01 23:21:40.054 | INFO | open_webui.retrieval.vector.dbs.milvus:_create_collection:157 - Successfully created collection 'open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac' with index type 'FLAT' and metric 'COSINE'.
2025-09-01 23:21:40.054 | INFO | open_webui.retrieval.vector.dbs.milvus:insert:274 - Inserting 1 items into collection open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac.
2025-09-01 23:21:40.104 | INFO | open_webui.retrieval.vector.dbs.milvus:query:214 - Querying collection open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac with filter: '', limit: None
2025-09-01 23:21:40.636 | ERROR | open_webui.retrieval.vector.dbs.milvus:query:239 - Error querying collection open_webui_file_390d26ab_cdf1_4834_b637_364c222af8ac with filter '' and limit None: unsupported operand type(s) for -: 'NoneType' and 'int'
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 0x7ffaa86989a0>
└ <Thread(ThreadPoolExecutor-5_0, started 140711675750080)>
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
│ └ <function Thread.run at 0x7ffaa8698680>
└ <Thread(ThreadPoolExecutor-5_0, started 140711675750080)>
File "/usr/local/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <Thread(ThreadPoolExecutor-5_0, started 140711675750080)>
│ │ │ └ (<weakref at 0x7ff9fc609c10; to 'ThreadPoolExecutor' at 0x7ffa1f394050>, <_queue.SimpleQueue object at 0x7ff9fc5cb3d0>, None,...
│ │ └ <Thread(ThreadPoolExecutor-5_0, started 140711675750080)>
│ └ <function _worker at 0x7ffaa77709a0>
└ <Thread(ThreadPoolExecutor-5_0, started 140711675750080)>
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
work_item.run()
│ └ <function _WorkItem.run at 0x7ffaa7770ae0>
└ <concurrent.futures.thread._WorkItem object at 0x7ffa1e856650>
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
│ │ │ │ │ └ {}
│ │ │ │ └ <concurrent.futures.thread._WorkItem object at 0x7ffa1e856650>
│ │ │ └ ()
│ │ └ <concurrent.futures.thread._WorkItem object at 0x7ffa1e856650>
│ └ <function chat_completion_files_handler.. at 0x7ffa1e8205e0>
└ <concurrent.futures.thread._WorkItem object at 0x7ffa1e856650>
File "/app/backend/open_webui/utils/middleware.py", line 670, in
lambda: get_sources_from_items(
└ <function get_sources_from_items at 0x7ffa54c65620>
File "/app/backend/open_webui/retrieval/utils.py", line 647, in get_sources_from_items
query_result = query_collection_with_hybrid_search(
└ <function query_collection_with_hybrid_search at 0x7ffa54c65440>
File "/app/backend/open_webui/retrieval/utils.py", line 353, in query_collection_with_hybrid_search
collection_results[collection_name] = VECTOR_DB_CLIENT.get(
│ │ │ └ <function MilvusClient.get at 0x7ffa743339c0>
│ │ └ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7ffa7cfe0d50>
│ └ 'file-390d26ab-cdf1-4834-b637-364c222af8ac'
└ {}
File "/app/backend/open_webui/retrieval/vector/dbs/milvus.py", line 252, in get
return self.query(collection_name=collection_name, filter={}, limit=None)
│ │ └ 'file_390d26ab_cdf1_4834_b637_364c222af8ac'
│ └ <function MilvusClient.query at 0x7ffa74333920>
└ <open_webui.retrieval.vector.dbs.milvus.MilvusClient object at 0x7ffa7cfe0d50>
File "/usr/local/lib/python3.11/site-packages/pymilvus/orm/iterator.py", line 307, in next
ret = self.__check_reached_limit(ret)
│ └ [{'data': {'text': "\n\n## 회원가입하기\n\n## 회원의 유형\n\nTracX Logis 스마트십 회원에는 ' 베이직 멤버 ' 와 ' 비즈니스 멤버 ' 의 두 가지 유형이 있습니...
└ <pymilvus.orm.iterator.QueryIterator object at 0x7ffa20c4ee10>
File "/usr/local/lib/python3.11/site-packages/pymilvus/orm/iterator.py", line 316, in __check_reached_limit
left_count = self._limit - self._returned_count
│ │ │ └ 0
│ │ └ <pymilvus.orm.iterator.QueryIterator object at 0x7ffa20c4ee10>
│ └ None
└ <pymilvus.orm.iterator.QueryIterator object at 0x7ffa20c4ee10>
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'
2025-09-01 23:21:40.638 | INFO | open_webui.retrieval.utils:query_collection_with_hybrid_search:362 - Starting hybrid search for 1 queries in 1 collections...
Additional Information
No response
@CHOIBYOUNGHO commented on GitHub (Sep 2, 2025):
Upon rechecking, it appears to be the same report as #17088