mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #19733] issue: AttributeError: 'str' object has no attribute 'get' when using Bocha search engine #57639
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 @Sorkai on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19733
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.41
Ollama Version (if applicable)
No response
Operating System
Windows 11 Version 25H2 (Build 26200.7309)
Browser (if applicable)
Microsoft Edge 142.0.3595.94
Confirmation
README.md.Expected Behavior
Web Search (Bocha): When using bocha as the search engine, it should correctly parse the JSON response and return search results without crashing.
Actual Behavior
When using bocha as the Web Search Engine, the retrieval process crashes with an AttributeError. The logs indicate that the application is receiving a dictionary response from the Bocha API (containing a "webpage" key) but is iterating over the dictionary keys (specifically the string "webpage") instead of the list of results inside it. This causes get_filtered_results to fail when it tries to call .get() on a string.
Steps to Reproduce
Logs & Screenshots
1Panel-ollama-webui-9dLT-20251204124325.log
Additional Information
Based on the logs, the data passed to get_filtered_results is: {'webpage': [{'id': '...', 'name': '...', ...}]} The code seems to need to extract results['webpage'] before passing it to get_filtered_results in bocha.py.
@owui-terminator[bot] commented on GitHub (Dec 4, 2025):
🔍 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:
#19698 issue: .41 web based search and webpages - RAG - are not fixed
by frenzybiscuit • Dec 02, 2025 •
bug#11661 issue: Can not use Bocha websearch API, return "No search results found"
by pandalaohe • Mar 14, 2025 •
bug#19654 issue: Type Error when adding URL to chat context
by apunkt • Dec 01, 2025 •
bug#19563 issue:
by naruto7g • Nov 28, 2025 •
bug#19211 issue:
by Byrnes9 • Nov 16, 2025 •
bugShow 5 more related issues
#13536 issue: Searching doesn't work, at all.
by SerenoV7 • May 05, 2025 •
bug#16847 issue: The online search function using searxng is not working (v0.6.25)
by GN998 • Aug 23, 2025 •
bug#19247 issue: Sporadic server errors when searching chats
by richardwatts-seale • Nov 17, 2025 •
bug#11721 issue: Web Search not working!
by Hashah2311 • Mar 15, 2025 •
bug#19417 issue: v0.6.37 SQL Error
by AKHYP • Nov 24, 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.
@Classic298 commented on GitHub (Dec 14, 2025):
@silentoplayz maybe you can repro?
@silentoplayz commented on GitHub (Dec 15, 2025):
I can't test this one.
@Sorkai commented on GitHub (Dec 15, 2025):
What kind of tests are needed? I think I can handle them.
@Classic298 commented on GitHub (Dec 15, 2025):
@Sorkai you reported the issue
Someone else should independently test, if your report is reproducible. If it is it can be fixed
@zengxy commented on GitHub (Dec 17, 2025):
I also encountered this bug, which can be reproduced when the domain filter list is set to non-empty. I submitted a PR to fix it.
@Classic298
@Classic298 commented on GitHub (Dec 20, 2025):
fixed in dev, thanks!
b5bd8704fe