mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 23:55:15 -05:00
[GH-ISSUE #20703] issue: Some Knowledge Bases dont work(?) #73872
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 @Nels2 on GitHub (Jan 15, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20703
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.7.4
Ollama Version (if applicable)
N/A
Operating System
Linux/Windows 11
Browser (if applicable)
Chrome, Firefox, MSEdge - all latest versions.
Confirmation
README.md.Expected Behavior
To be able to use RAG with a two knowledge databases. Of the two, one DB has 272 PDF Files and the second one has 58 PDF Files.
What's weird is that I have a different model hooked up with 4 knowledge databases that each have over 500 PDF files each.
Actual Behavior
026-01-15 19:03:30.628 | INFO | open_webui.retrieval.utils:query_doc:150 - query_doc:result 'c74e5187-cfee-4094-893e-cc0b1b1c2181', '9c7171ed-87a2-4e0c-bf6c-5aa73d304e5f', 'ad319eac-fca2-4df7-98a5-c9d61da152b7', '855e1d40-8474-429c-b1e6-63f8001e92e8', '6e7728f5-7733-4e76-adb2-0eb921aa942b' {'source': 'SH9300 - Add A Joint Owner After Initital Setup.pdf.txt', 'name': 'SH9300 - Add A Joint Owner After Initital Setup.pdf.txt', 'created_by': 'ea8144d2-6094-44b4-979d-e91a891b1495', 'file_id': 'c2737c31-a4c2-49fc-9860-df7d125fb7e1', 'start_index': 0, 'hash': 'c95edd694c91d6382125e6498e4588b155e7c3f9a07cfe90c02ac2cd9d4321ee', 'embedding_config': {'engine': 'openai', 'model': 'BAAI/bge-m3'}}, {'source': 'SH9300 - Add A Joint Owner After Initital Setup.pdf.txt', 'name': 'SH9300 - Add A Joint Owner After Initital Setup.pdf.txt', 'created_by': 'ea8144d2-6094-44b4-979d-e91a891b1495', 'file_id': 'c2737c31-a4c2-49fc-9860-df7d125fb7e1', 'start_index': 0, 'hash': 'c95edd694c91d6382125e6498e4588b155e7c3f9a07cfe90c02ac2cd9d4321ee', 'embedding_config': {'engine': 'openai', 'model': 'BAAI/bge-m3'}}, {'source': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'name': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'created_by': 'ea8144d2-6094-44b4-979d-e91a891b1495', 'file_id': 'd24470a5-0ea1-4909-9e1d-4a48c59d43a9', 'start_index': 0, 'hash': '3c9321d4df25824de6fd5b99c700400ed1fe447675482d43082531c233886908', 'embedding_config': {'engine': 'openai', 'model': 'BAAI/bge-m3'}}, {'source': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'name': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'created_by': 'ea8144d2-6094-44b4-979d-e91a891b1495', 'file_id': 'd24470a5-0ea1-4909-9e1d-4a48c59d43a9', 'start_index': 0, 'hash': '3c9321d4df25824de6fd5b99c700400ed1fe447675482d43082531c233886908', 'embedding_config': {'engine': 'openai', 'model': 'BAAI/bge-m3'}}, {'source': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'name': 'SH9311 - Open a Secondary Share Account.pdf.txt', 'created_by': 'ea8144d2-6094-44b4-979d-e91a891b1495', 'file_id': 'd24470a5-0ea1-4909-9e1d-4a48c59d43a9', 'start_index': 0, 'hash': '3c9321d4df25824de6fd5b99c700400ed1fe447675482d43082531c233886908', 'embedding_config': {'engine': 'openai', 'model': 'BAAI/bge-m3'}}
2026-01-15 19:03:30.628 | ERROR | open_webui.tools.builtin:query_knowledge_files:1564 - query_knowledge_files error: slice indices must be integers or None or have an index method
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 4, in
uvicorn.main()
│ └
└ <module 'uvicorn' from '/usr/local/lib/python3.11/site-packages/uvicorn/init.py'>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1485, in call
return self.main(args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function Command.main at 0x759a19732e80>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x759a1a4b4c50>
│ └ <function Command.invoke at 0x759a19732b60>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
│ │ │ │ └ <click.core.Context object at 0x759a1a4b4c50>
│ │ │ └ <function main at 0x759a193ecb80>
│ │ └
│ └ <function Context.invoke at 0x759a19731da0>
└ <click.core.Context object at 0x759a1a4b4c50>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 824, in invoke
return callback(args, **kwargs)
│ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
│ └ ()
└ <function main at 0x759a193ecb80>
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 424, in main
run(
└ <function run at 0x759a1968d4e0>
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 594, in run
server.run()
│ └ <function Server.run at 0x759a1968cd60>
└ <uvicorn.server.Server object at 0x759a1980b3d0>
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
│ │ │ │ │ │ └ <function Config.get_loop_factory at 0x759a198114e0>
│ │ │ │ │ └ <uvicorn.config.Config object at 0x759a197034d0>
│ │ │ │ └ <uvicorn.server.Server object at 0x759a1980b3d0>
│ │ │ └ None
│ │ └ <function Server.serve at 0x759a1968ce00>
│ └ <uvicorn.server.Server object at 0x759a1980b3d0>
└ <function asyncio_run at 0x759a19741e40>
File "/usr/local/lib/python3.11/site-packages/uvicorn/_compat.py", line 30, in asyncio_run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x759a193e98a0>
│ └ <function Runner.run at 0x759a199d4fe0>
└ <asyncio.runners.Runner object at 0x759a1974eb90>
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:71> wai...
│ │ └ <cyfunction Loop.run_until_complete at 0x759a19460040>
│ └ <uvloop.Loop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x759a1974eb90>
File "/app/backend/open_webui/main.py", line 1729, in process_chat
return await process_chat_response(
└ <function process_chat_response at 0x7599a918ade0>
File "/app/backend/open_webui/utils/middleware.py", line 3677, in process_chat_response
return await response_handler(response, events)
│ │ └ []
│ └ <starlette.responses.StreamingResponse object at 0x7599a4e9d090>
└ <function process_chat_response..response_handler at 0x759946fabe20>
File "/app/backend/open_webui/utils/middleware.py", line 3321, in response_handler
tool_result = await tool_function(
└ <function query_knowledge_files at 0x759984868400>
File "/app/backend/open_webui/utils/tools.py", line 107, in new_function
return await partial_func(*args, **kwargs)
│ │ └ {'query': 'Adding a joint owner after initial setup', 'knowledge_ids': 'null', 'count': '5'}
│ └ ()
└ functools.partial(<function query_knowledge_files at 0x7599ab417380>, request=<starlette.requests.Request object at 0x759...
File "/app/backend/open_webui/retrieval/utils.py", line 456, in query_collection
return merge_and_sort_query_results(results, k=k)
│ │ └ '5'
│ └ [{'ids': [['c74e5187-cfee-4094-893e-cc0b1b1c2181', '9c7171ed-87a2-4e0c-bf6c-5aa73d304e5f', 'ad319eac-fca2-4df7-98a5-c9d61da15...
└ <function merge_and_sort_query_results at 0x7599ab80f6a0>
File "/app/backend/open_webui/retrieval/utils.py", line 377, in merge_and_sort_query_results
zip(*combined[:k]) if combined else ([], [], [])
│ │ └ [(0.93724645, '## Subject: ADD A JOINT OWNER AFTER INITIAL SETUP', {'source': 'SH9300 - Add A Joint Owner After Initital Setu...
│ └ '5'
└ [(0.93724645, '## Subject: ADD A JOINT OWNER AFTER INITIAL SETUP', {'source': 'SH9300 - Add A Joint Owner After Initital Setu...
TypeError: slice indices must be integers or None or have an index method
2026-01-15 19:03:30.630 | ERROR | open_webui.utils.middleware:get_citation_source_from_tool_result:279 - Error parsing tool result for query_knowledge_files: 'str' object has no attribute 'get'
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 4, in
uvicorn.main()
│ └
└ <module 'uvicorn' from '/usr/local/lib/python3.11/site-packages/uvicorn/init.py'>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1485, in call
return self.main(args, **kwargs)
│ │ │ └ {}
│ │ └ ()
│ └ <function Command.main at 0x759a19732e80>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1406, in main
rv = self.invoke(ctx)
│ │ └ <click.core.Context object at 0x759a1a4b4c50>
│ └ <function Command.invoke at 0x759a19732b60>
└
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1269, in invoke
return ctx.invoke(self.callback, **ctx.params)
│ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
│ │ │ │ └ <click.core.Context object at 0x759a1a4b4c50>
│ │ │ └ <function main at 0x759a193ecb80>
│ │ └
│ └ <function Context.invoke at 0x759a19731da0>
└ <click.core.Context object at 0x759a1a4b4c50>
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 824, in invoke
return callback(args, **kwargs)
│ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
│ └ ()
└ <function main at 0x759a193ecb80>
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 424, in main
run(
└ <function run at 0x759a1968d4e0>
File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 594, in run
server.run()
│ └ <function Server.run at 0x759a1968cd60>
└ <uvicorn.server.Server object at 0x759a1980b3d0>
File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 67, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
│ │ │ │ │ │ └ <function Config.get_loop_factory at 0x759a198114e0>
│ │ │ │ │ └ <uvicorn.config.Config object at 0x759a197034d0>
│ │ │ │ └ <uvicorn.server.Server object at 0x759a1980b3d0>
│ │ │ └ None
│ │ └ <function Server.serve at 0x759a1968ce00>
│ └ <uvicorn.server.Server object at 0x759a1980b3d0>
└ <function asyncio_run at 0x759a19741e40>
File "/usr/local/lib/python3.11/site-packages/uvicorn/_compat.py", line 30, in asyncio_run
return runner.run(main)
│ │ └ <coroutine object Server.serve at 0x759a193e98a0>
│ └ <function Runner.run at 0x759a199d4fe0>
└ <asyncio.runners.Runner object at 0x759a1974eb90>
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
│ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:71> wai...
│ │ └ <cyfunction Loop.run_until_complete at 0x759a19460040>
│ └ <uvloop.Loop running=True closed=False debug=False>
└ <asyncio.runners.Runner object at 0x759a1974eb90>
File "/app/backend/open_webui/main.py", line 1729, in process_chat
return await process_chat_response(
└ <function process_chat_response at 0x7599a918ade0>
File "/app/backend/open_webui/utils/middleware.py", line 3677, in process_chat_response
return await response_handler(response, events)
│ │ └ []
│ └ <starlette.responses.StreamingResponse object at 0x7599a4e9d090>
└ <function process_chat_response..response_handler at 0x759946fabe20>
File "/app/backend/open_webui/utils/middleware.py", line 3351, in response_handler
citation_sources = get_citation_source_from_tool_result(
└ <function get_citation_source_from_tool_result at 0x7599a918a520>
AttributeError: 'str' object has no attribute 'get'
Steps to Reproduce
Docker Command to launch on Ubuntu 24.04.03 LTS:
Everything WEBUI connects to is hosted internally within my network.
Logs & Screenshots
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Jan 15, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#20666 issue: knowledge sharing in groups member broken
by janl772 • Jan 14, 2026 •
bug#20335 issue: Display Issue with Knowledge Database Selection in OpenWebUI 0.6.43
by zunami • Jan 02, 2026 •
bug#20236 issue: Select knowledge within Folders
by liucoj • Dec 29, 2025 •
bug#19752 issue: minor UI Bug: knowledge sharing
by mahenning • Dec 04, 2025 •
bug,confirmed issue#19491 issue: Referencing Knowledge in chats with '#' no longer shows which knowledge base does the file belong to
by donatas-xyz • Nov 25, 2025 •
bugShow 5 more related issues
#20229 issue: Knowledge Base not visible when shared with multiple groups (SQLite)
by taka817123 • Dec 29, 2025 •
bug,confirmed issue#17700 issue: Using single file from knowledge base is not working
by DrZoidberg09 • Sep 24, 2025 •
bug#20329 issue: Referencing Knowledge in chats with '#' shows
undefinedinstead of which knowledge base does the file belong toby donatas-xyz • Jan 02, 2026 •
bug,confirmed issue#14468 issue: Searching and referencing knowledge bases on the Internet is invalid
by a506488043 • May 29, 2025 •
bug#14861 issue: Slow knowledge listing
by a3957273 • Jun 10, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.