mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #9964] The internet search function I want to enable in open-webui is encountering the following error. It has been verified in Postman that the content was returned normally. May I ask how to handle it? #31244
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 @cookdrinker on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9964
The internet search function I want to enable in open-webui is encountering the following error. It has been verified in Postman that the content was returned normally. May I ask how to handle it? Thank you very much to the authors for supporting this issue
open-webui | INFO: 192.168.8.68:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "GET /api/v1/chats/61c595a7-b486-4b35-8f8e-f327a727d13d HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK
open-webui | INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document 北京 二月, 2025 天气 ⋆ 北京 (中国) 二月 天气 预报 ⋆ METEOPROG , 今明天北京晴暖当道继续升温 后天冷空气搅扰气温再度下滑 - 西部网(陕西新闻网), 北京2月份天气|北京2月份气温|北京2025年2月份历史天气—全球天气网 web-search-04453728508e0cb0ec1ba71737b948831d6a7f71a03fa2dd9057
open-webui | INFO [open_webui.routers.retrieval] adding to collection web-search-04453728508e0cb0ec1ba71737b948831d6a7f71a03fa2dd9057
open-webui | ERROR [open_webui.routers.retrieval] 'NoneType' object has no attribute 'encode'
open-webui | Traceback (most recent call last):
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 797, in save_docs_to_vector_db
open-webui | embeddings = embedding_function(
open-webui | ^^^^^^^^^^^^^^^^^^^
open-webui | File "/app/backend/open_webui/retrieval/utils.py", line 265, in
open-webui | return lambda query, user=None: embedding_function.encode(query).tolist()
open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui | AttributeError: 'NoneType' object has no attribute 'encode'
open-webui | ERROR [open_webui.routers.retrieval] 'NoneType' object has no attribute 'encode'
open-webui | Traceback (most recent call last):
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 1319, in process_web_search
open-webui | save_docs_to_vector_db(
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 819, in save_docs_to_vector_db
open-webui | raise e
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 797, in save_docs_to_vector_db
open-webui | embeddings = embedding_function(
open-webui | ^^^^^^^^^^^^^^^^^^^
open-webui | File "/app/backend/open_webui/retrieval/utils.py", line 265, in
open-webui | return lambda query, user=None: embedding_function.encode(query).tolist()
open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui | AttributeError: 'NoneType' object has no attribute 'encode'
open-webui | ERROR [open_webui.utils.middleware] 400: [ERROR: 'NoneType' object has no attribute 'encode']
open-webui | Traceback (most recent call last):
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 1319, in process_web_search
open-webui | save_docs_to_vector_db(
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 819, in save_docs_to_vector_db
open-webui | raise e
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 797, in save_docs_to_vector_db
open-webui | embeddings = embedding_function(
open-webui | ^^^^^^^^^^^^^^^^^^^
open-webui | File "/app/backend/open_webui/retrieval/utils.py", line 265, in
open-webui | return lambda query, user=None: embedding_function.encode(query).tolist()
open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui | AttributeError: 'NoneType' object has no attribute 'encode'
open-webui |
open-webui | During handling of the above exception, another exception occurred:
open-webui |
open-webui | Traceback (most recent call last):
open-webui | File "/app/backend/open_webui/utils/middleware.py", line 340, in chat_web_search_handler
open-webui | results = await loop.run_in_executor(
open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui | File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
open-webui | result = self.fn(*self.args, **self.kwargs)
open-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
open-webui | File "/app/backend/open_webui/utils/middleware.py", line 342, in
open-webui | lambda: process_web_search(
open-webui | ^^^^^^^^^^^^^^^^^^^
open-webui | File "/app/backend/open_webui/routers/retrieval.py", line 1330, in process_web_search
open-webui | raise HTTPException(
open-webui | fastapi.exceptions.HTTPException: 400: [ERROR: 'NoneType' object has no attribute 'encode']
open-webui | INFO: 192.168.8.68:0 - "POST /api/chat/completions HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "POST /api/chat/completed HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "POST /api/v1/chats/61c595a7-b486-4b35-8f8e-f327a727d13d HTTP/1.1" 200 OK
open-webui | INFO: 192.168.8.68:0 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK