[GH-ISSUE #20003] issue: Web Search with BRAVE API does not work. #57726

Closed
opened 2026-05-05 21:29:44 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @tigran123 on GitHub (Dec 17, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20003

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Pip Install

Open WebUI Version

0.6.41

Ollama Version (if applicable)

0.12.10

Operating System

Ubuntu Linux 22.04.5

Browser (if applicable)

Chrome 142.0.7444.175 (Official Build) (64-bit)

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

Web search should provide results.

Actual Behavior

It does not.

Steps to Reproduce

  1. Select any model, capable of web search (e.g. paid gpt-5.2 or free groq/compound)
  2. Give a query like "Give me the list of fresh news using web search"
  3. Observe that it fails with the error shown in the log section below:

Logs & Screenshots

2025-12-17 09:45:56.859 | ERROR    | open_webui.utils.middleware:chat_web_search_handler:606 - 'JSONResponse' object is not subscriptable
Traceback (most recent call last):

  File "/home/tigran/.local/bin/open-webui", line 8, in <module>
    sys.exit(app())
    │   │    └ <typer.main.Typer object at 0x7f5e7fc00860>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 309, in __call__
    return get_command(self)(*args, **kwargs)
           │           │      │       └ {}
           │           │      └ ()
           │           └ <typer.main.Typer object at 0x7f5e7fc00860>
           └ <function get_command at 0x7f5e7f235760>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function TyperGroup.main at 0x7f5e7f233f60>
           └ <TyperGroup >
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 723, in main
    return _main(
           └ <function _main at 0x7f5e7f232fc0>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 193, in _main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0x7f5e7ea728d0>
         │    └ <function Group.invoke at 0x7f5e7f965580>
         └ <TyperGroup >
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
           │               │       │       │      └ <click.core.Context object at 0x7f5e7fc10da0>
           │               │       │       └ <function Command.invoke at 0x7f5e7f964360>
           │               │       └ <TyperCommand serve>
           │               └ <click.core.Context object at 0x7f5e7fc10da0>
           └ <function Group.invoke.<locals>._process_result at 0x7f5e7e82aa20>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'host': '0.0.0.0', 'port': 8080}
           │   │      │    │           └ <click.core.Context object at 0x7f5e7fc10da0>
           │   │      │    └ <function serve at 0x7f5e7e82a840>
           │   │      └ <TyperCommand serve>
           │   └ <function Context.invoke at 0x7f5e7f95b560>
           └ <click.core.Context object at 0x7f5e7fc10da0>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           │         │       └ {'host': '0.0.0.0', 'port': 8080}
           │         └ ()
           └ <function serve at 0x7f5e7e82a840>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 692, in wrapper
    return callback(**use_params)
           │          └ {'host': '0.0.0.0', 'port': 8080}
           └ <function serve at 0x7f5e7e933240>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/__init__.py", line 78, in serve
    uvicorn.run(
    │       └ <function run at 0x7f5e7eabf420>
    └ <module 'uvicorn' from '/home/tigran/.local/lib/python3.12/site-packages/uvicorn/__init__.py'>
  File "/home/tigran/.local/lib/python3.12/site-packages/uvicorn/main.py", line 593, in run
    server.run()
    │      └ <function Server.run at 0x7f5e7eabeca0>
    └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
  File "/home/tigran/.local/lib/python3.12/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 0x7f5e7ea5b380>
           │           │    │             │                      │    └ <uvicorn.config.Config object at 0x7f5e7f552840>
           │           │    │             │                      └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
           │           │    │             └ None
           │           │    └ <function Server.serve at 0x7f5e7eabed40>
           │           └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
           └ <function run at 0x7f5e7eb5e480>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0x7f5e7e9cf680>
           │      └ <function Runner.run at 0x7f5e7eb75760>
           └ <asyncio.runners.Runner object at 0x7f5cd65a0b00>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │     │                  └ <Task pending name='Task-1' coro=<Server.serve() running at /home/tigran/.local/lib/python3.12/site-packages/uvicorn/server.p...
           │    │     └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7f5cd65a0b00>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/main.py", line 1624, in process_chat
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7f5d02b18900>
    │          └ {'user_id': 'cdb67ffa-03ad-442d-a4ca-e63eeb133b06', 'chat_id': '04bc37cc-5014-4f2b-a41d-f89971656a7e', 'message_id': '37ed5d0...
    └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us...
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 1269, in process_chat_payload
    form_data = await chat_web_search_handler(
                      └ <function chat_web_search_handler at 0x7f5d02b18540>
> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 587, in chat_web_search_handler
    response = res["choices"][0]["message"]["content"]
               └ <starlette.responses.JSONResponse object at 0x7f5ccff8e3c0>

TypeError: 'JSONResponse' object is not subscriptable
Fetching pages: 100%|#########################################################################################################################################################################################################################################################| 1/1 [00:00<00:00, 22.05it/s]
2025-12-17 09:45:57.457 | INFO     | open_webui.routers.retrieval:save_docs_to_vector_db:1375 - generating embeddings for web-search-84d7a10bcabee0c53086c09473f82067891d8a611849ec663da9
2025-12-17 09:45:57.459 | ERROR    | open_webui.routers.retrieval:save_docs_to_vector_db:1435 - 'NoneType' object has no attribute 'encode'
Traceback (most recent call last):

  File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
    │    └ <function Thread._bootstrap_inner at 0x7f5e7fd9de40>
    └ <WorkerThread(AnyIO worker thread, started 140036593935936)>
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
    │    └ <function WorkerThread.run at 0x7f5cd60f34c0>
    └ <WorkerThread(AnyIO worker thread, started 140036593935936)>
  File "/home/tigran/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 967, in run
    result = context.run(func, *args)
             │       │   │      └ ()
             │       │   └ functools.partial(<function save_docs_to_vector_db at 0x7f5d38898d60>, <starlette.requests.Request object at 0x7f5cccce1250>,...
             │       └ <method 'run' of '_contextvars.Context' objects>
             └ <_contextvars.Context object at 0x7f5ccceb4ec0>
> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/routers/retrieval.py", line 1407, in save_docs_to_vector_db
    embeddings = asyncio.run(
                 │       └ <function run at 0x7f5e7eb5e480>
                 └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           │      │   └ <coroutine object get_embedding_function.<locals>.async_embedding_function at 0x7f5cd60724d0>
           │      └ <function Runner.run at 0x7f5e7eb75760>
           └ <asyncio.runners.Runner object at 0x7f5cccce0d70>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │                        └ <Task finished name='Task-43251' coro=<get_embedding_function.<locals>.async_embedding_function() done, defined at /home/tigr...
           │    └ None
           └ <asyncio.runners.Runner object at 0x7f5cccce0d70>
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           │      └ <method 'result' of '_asyncio.Task' objects>
           └ <Task finished name='Task-43251' coro=<get_embedding_function.<locals>.async_embedding_function() done, defined at /home/tigr...
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 790, in async_embedding_function
    return await asyncio.to_thread(
                 │       └ <function to_thread at 0x7f5e7eb89e40>
                 └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'>
  File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
    return await loop.run_in_executor(None, func_call)
                 │    │                     └ functools.partial(<built-in method run of _contextvars.Context object at 0x7f5cccb60640>, <function get_embedding_function.<l...
                 │    └ <function BaseEventLoop.run_in_executor at 0x7f5e7eb6fc40>
                 └ <_UnixSelectorEventLoop running=False closed=True debug=False>
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │        │            └ None
             │        └ None
             └ None
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 792, in <lambda>
    lambda query, prefix=None: embedding_function.encode(
           │                   └ None
           └ ['Just a moment...Enable JavaScript and cookies to continue']

AttributeError: 'NoneType' object has no attribute 'encode'
2025-12-17 09:45:58.675 | ERROR    | open_webui.retrieval.utils:get_sources_from_items:1169 - 'NoneType' object has no attribute 'encode'
Traceback (most recent call last):

  File "/home/tigran/.local/bin/open-webui", line 8, in <module>
    sys.exit(app())
    │   │    └ <typer.main.Typer object at 0x7f5e7fc00860>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 309, in __call__
    return get_command(self)(*args, **kwargs)
           │           │      │       └ {}
           │           │      └ ()
           │           └ <typer.main.Typer object at 0x7f5e7fc00860>
           └ <function get_command at 0x7f5e7f235760>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1442, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function TyperGroup.main at 0x7f5e7f233f60>
           └ <TyperGroup >
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 723, in main
    return _main(
           └ <function _main at 0x7f5e7f232fc0>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 193, in _main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0x7f5e7ea728d0>
         │    └ <function Group.invoke at 0x7f5e7f965580>
         └ <TyperGroup >
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1830, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
           │               │       │       │      └ <click.core.Context object at 0x7f5e7fc10da0>
           │               │       │       └ <function Command.invoke at 0x7f5e7f964360>
           │               │       └ <TyperCommand serve>
           │               └ <click.core.Context object at 0x7f5e7fc10da0>
           └ <function Group.invoke.<locals>._process_result at 0x7f5e7e82aa20>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1226, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'host': '0.0.0.0', 'port': 8080}
           │   │      │    │           └ <click.core.Context object at 0x7f5e7fc10da0>
           │   │      │    └ <function serve at 0x7f5e7e82a840>
           │   │      └ <TyperCommand serve>
           │   └ <function Context.invoke at 0x7f5e7f95b560>
           └ <click.core.Context object at 0x7f5e7fc10da0>
  File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 794, in invoke
    return callback(*args, **kwargs)
           │         │       └ {'host': '0.0.0.0', 'port': 8080}
           │         └ ()
           └ <function serve at 0x7f5e7e82a840>
  File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 692, in wrapper
    return callback(**use_params)
           │          └ {'host': '0.0.0.0', 'port': 8080}
           └ <function serve at 0x7f5e7e933240>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/__init__.py", line 78, in serve
    uvicorn.run(
    │       └ <function run at 0x7f5e7eabf420>
    └ <module 'uvicorn' from '/home/tigran/.local/lib/python3.12/site-packages/uvicorn/__init__.py'>
  File "/home/tigran/.local/lib/python3.12/site-packages/uvicorn/main.py", line 593, in run
    server.run()
    │      └ <function Server.run at 0x7f5e7eabeca0>
    └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
  File "/home/tigran/.local/lib/python3.12/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 0x7f5e7ea5b380>
           │           │    │             │                      │    └ <uvicorn.config.Config object at 0x7f5e7f552840>
           │           │    │             │                      └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
           │           │    │             └ None
           │           │    └ <function Server.serve at 0x7f5e7eabed40>
           │           └ <uvicorn.server.Server object at 0x7f5cd64b3e90>
           └ <function run at 0x7f5e7eb5e480>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0x7f5e7e9cf680>
           │      └ <function Runner.run at 0x7f5e7eb75760>
           └ <asyncio.runners.Runner object at 0x7f5cd65a0b00>
  File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │     │                  └ <Task pending name='Task-1' coro=<Server.serve() running at /home/tigran/.local/lib/python3.12/site-packages/uvicorn/server.p...
           │    │     └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7f5cd65a0b00>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/main.py", line 1624, in process_chat
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7f5d02b18900>
    │          └ {'user_id': 'cdb67ffa-03ad-442d-a4ca-e63eeb133b06', 'chat_id': '04bc37cc-5014-4f2b-a41d-f89971656a7e', 'message_id': '37ed5d0...
    └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us...
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 1506, in process_chat_payload
    form_data, flags = await chat_completion_files_handler(
    │                        └ <function chat_completion_files_handler at 0x7f5d02b187c0>
    └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us...
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 989, in chat_completion_files_handler
    sources = await get_sources_from_items(
                    └ <function get_sources_from_items at 0x7f5d3889a020>
> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 1162, in get_sources_from_items
    query_result = await query_collection(
                         └ <function query_collection at 0x7f5d38899760>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 427, in query_collection
    query_embeddings = await embedding_function(
                             └ <function chat_completion_files_handler.<locals>.<lambda> at 0x7f5cccdf7920>
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 790, in async_embedding_function
    return await asyncio.to_thread(
                 │       └ <function to_thread at 0x7f5e7eb89e40>
                 └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'>
  File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
    return await loop.run_in_executor(None, func_call)
                 │    │                     └ functools.partial(<built-in method run of _contextvars.Context object at 0x7f5cd655dcc0>, <function get_embedding_function.<l...
                 │    └ <method 'run_in_executor' of 'uvloop.loop.Loop' objects>
                 └ <uvloop.Loop running=True closed=False debug=False>
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             │        │            └ None
             │        └ None
             └ None
  File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 792, in <lambda>
    lambda query, prefix=None: embedding_function.encode(
           │                   └ None
           └ ['Дай мне список самых свежих новостей, со ссылками на источники. Используй веб поиск.']

AttributeError: 'NoneType' object has no attribute 'encode'


### Additional Information

_No response_
Originally created by @tigran123 on GitHub (Dec 17, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20003 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Pip Install ### Open WebUI Version 0.6.41 ### Ollama Version (if applicable) 0.12.10 ### Operating System Ubuntu Linux 22.04.5 ### Browser (if applicable) Chrome 142.0.7444.175 (Official Build) (64-bit) ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior Web search should provide results. ### Actual Behavior It does not. ### Steps to Reproduce 1. Select any model, capable of web search (e.g. paid gpt-5.2 or free groq/compound) 2. Give a query like "Give me the list of fresh news using web search" 3. Observe that it fails with the error shown in the log section below: ### Logs & Screenshots ``` 2025-12-17 09:45:56.859 | ERROR | open_webui.utils.middleware:chat_web_search_handler:606 - 'JSONResponse' object is not subscriptable Traceback (most recent call last): File "/home/tigran/.local/bin/open-webui", line 8, in <module> sys.exit(app()) │ │ └ <typer.main.Typer object at 0x7f5e7fc00860> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 309, in __call__ return get_command(self)(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <typer.main.Typer object at 0x7f5e7fc00860> └ <function get_command at 0x7f5e7f235760> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1442, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function TyperGroup.main at 0x7f5e7f233f60> └ <TyperGroup > File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 723, in main return _main( └ <function _main at 0x7f5e7f232fc0> File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 193, in _main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x7f5e7ea728d0> │ └ <function Group.invoke at 0x7f5e7f965580> └ <TyperGroup > File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ │ │ └ <click.core.Context object at 0x7f5e7fc10da0> │ │ │ └ <function Command.invoke at 0x7f5e7f964360> │ │ └ <TyperCommand serve> │ └ <click.core.Context object at 0x7f5e7fc10da0> └ <function Group.invoke.<locals>._process_result at 0x7f5e7e82aa20> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1226, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080} │ │ │ │ └ <click.core.Context object at 0x7f5e7fc10da0> │ │ │ └ <function serve at 0x7f5e7e82a840> │ │ └ <TyperCommand serve> │ └ <function Context.invoke at 0x7f5e7f95b560> └ <click.core.Context object at 0x7f5e7fc10da0> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) │ │ └ {'host': '0.0.0.0', 'port': 8080} │ └ () └ <function serve at 0x7f5e7e82a840> File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 692, in wrapper return callback(**use_params) │ └ {'host': '0.0.0.0', 'port': 8080} └ <function serve at 0x7f5e7e933240> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/__init__.py", line 78, in serve uvicorn.run( │ └ <function run at 0x7f5e7eabf420> └ <module 'uvicorn' from '/home/tigran/.local/lib/python3.12/site-packages/uvicorn/__init__.py'> File "/home/tigran/.local/lib/python3.12/site-packages/uvicorn/main.py", line 593, in run server.run() │ └ <function Server.run at 0x7f5e7eabeca0> └ <uvicorn.server.Server object at 0x7f5cd64b3e90> File "/home/tigran/.local/lib/python3.12/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 0x7f5e7ea5b380> │ │ │ │ │ └ <uvicorn.config.Config object at 0x7f5e7f552840> │ │ │ │ └ <uvicorn.server.Server object at 0x7f5cd64b3e90> │ │ │ └ None │ │ └ <function Server.serve at 0x7f5e7eabed40> │ └ <uvicorn.server.Server object at 0x7f5cd64b3e90> └ <function run at 0x7f5e7eb5e480> File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) │ │ └ <coroutine object Server.serve at 0x7f5e7e9cf680> │ └ <function Runner.run at 0x7f5e7eb75760> └ <asyncio.runners.Runner object at 0x7f5cd65a0b00> File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /home/tigran/.local/lib/python3.12/site-packages/uvicorn/server.p... │ │ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7f5cd65a0b00> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/main.py", line 1624, in process_chat form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7f5d02b18900> │ └ {'user_id': 'cdb67ffa-03ad-442d-a4ca-e63eeb133b06', 'chat_id': '04bc37cc-5014-4f2b-a41d-f89971656a7e', 'message_id': '37ed5d0... └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us... File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 1269, in process_chat_payload form_data = await chat_web_search_handler( └ <function chat_web_search_handler at 0x7f5d02b18540> > File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 587, in chat_web_search_handler response = res["choices"][0]["message"]["content"] └ <starlette.responses.JSONResponse object at 0x7f5ccff8e3c0> TypeError: 'JSONResponse' object is not subscriptable Fetching pages: 100%|#########################################################################################################################################################################################################################################################| 1/1 [00:00<00:00, 22.05it/s] 2025-12-17 09:45:57.457 | INFO | open_webui.routers.retrieval:save_docs_to_vector_db:1375 - generating embeddings for web-search-84d7a10bcabee0c53086c09473f82067891d8a611849ec663da9 2025-12-17 09:45:57.459 | ERROR | open_webui.routers.retrieval:save_docs_to_vector_db:1435 - 'NoneType' object has no attribute 'encode' Traceback (most recent call last): File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap self._bootstrap_inner() │ └ <function Thread._bootstrap_inner at 0x7f5e7fd9de40> └ <WorkerThread(AnyIO worker thread, started 140036593935936)> File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner self.run() │ └ <function WorkerThread.run at 0x7f5cd60f34c0> └ <WorkerThread(AnyIO worker thread, started 140036593935936)> File "/home/tigran/.local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 967, in run result = context.run(func, *args) │ │ │ └ () │ │ └ functools.partial(<function save_docs_to_vector_db at 0x7f5d38898d60>, <starlette.requests.Request object at 0x7f5cccce1250>,... │ └ <method 'run' of '_contextvars.Context' objects> └ <_contextvars.Context object at 0x7f5ccceb4ec0> > File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/routers/retrieval.py", line 1407, in save_docs_to_vector_db embeddings = asyncio.run( │ └ <function run at 0x7f5e7eb5e480> └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'> File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) │ │ └ <coroutine object get_embedding_function.<locals>.async_embedding_function at 0x7f5cd60724d0> │ └ <function Runner.run at 0x7f5e7eb75760> └ <asyncio.runners.Runner object at 0x7f5cccce0d70> File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ └ <Task finished name='Task-43251' coro=<get_embedding_function.<locals>.async_embedding_function() done, defined at /home/tigr... │ └ None └ <asyncio.runners.Runner object at 0x7f5cccce0d70> File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete return future.result() │ └ <method 'result' of '_asyncio.Task' objects> └ <Task finished name='Task-43251' coro=<get_embedding_function.<locals>.async_embedding_function() done, defined at /home/tigr... File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 790, in async_embedding_function return await asyncio.to_thread( │ └ <function to_thread at 0x7f5e7eb89e40> └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'> File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) │ │ └ functools.partial(<built-in method run of _contextvars.Context object at 0x7f5cccb60640>, <function get_embedding_function.<l... │ └ <function BaseEventLoop.run_in_executor at 0x7f5e7eb6fc40> └ <_UnixSelectorEventLoop running=False closed=True debug=False> File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ └ None │ └ None └ None File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 792, in <lambda> lambda query, prefix=None: embedding_function.encode( │ └ None └ ['Just a moment...Enable JavaScript and cookies to continue'] AttributeError: 'NoneType' object has no attribute 'encode' 2025-12-17 09:45:58.675 | ERROR | open_webui.retrieval.utils:get_sources_from_items:1169 - 'NoneType' object has no attribute 'encode' Traceback (most recent call last): File "/home/tigran/.local/bin/open-webui", line 8, in <module> sys.exit(app()) │ │ └ <typer.main.Typer object at 0x7f5e7fc00860> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 309, in __call__ return get_command(self)(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <typer.main.Typer object at 0x7f5e7fc00860> └ <function get_command at 0x7f5e7f235760> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1442, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function TyperGroup.main at 0x7f5e7f233f60> └ <TyperGroup > File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 723, in main return _main( └ <function _main at 0x7f5e7f232fc0> File "/home/tigran/.local/lib/python3.12/site-packages/typer/core.py", line 193, in _main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0x7f5e7ea728d0> │ └ <function Group.invoke at 0x7f5e7f965580> └ <TyperGroup > File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1830, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) │ │ │ │ └ <click.core.Context object at 0x7f5e7fc10da0> │ │ │ └ <function Command.invoke at 0x7f5e7f964360> │ │ └ <TyperCommand serve> │ └ <click.core.Context object at 0x7f5e7fc10da0> └ <function Group.invoke.<locals>._process_result at 0x7f5e7e82aa20> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 1226, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080} │ │ │ │ └ <click.core.Context object at 0x7f5e7fc10da0> │ │ │ └ <function serve at 0x7f5e7e82a840> │ │ └ <TyperCommand serve> │ └ <function Context.invoke at 0x7f5e7f95b560> └ <click.core.Context object at 0x7f5e7fc10da0> File "/home/tigran/.local/lib/python3.12/site-packages/click/core.py", line 794, in invoke return callback(*args, **kwargs) │ │ └ {'host': '0.0.0.0', 'port': 8080} │ └ () └ <function serve at 0x7f5e7e82a840> File "/home/tigran/.local/lib/python3.12/site-packages/typer/main.py", line 692, in wrapper return callback(**use_params) │ └ {'host': '0.0.0.0', 'port': 8080} └ <function serve at 0x7f5e7e933240> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/__init__.py", line 78, in serve uvicorn.run( │ └ <function run at 0x7f5e7eabf420> └ <module 'uvicorn' from '/home/tigran/.local/lib/python3.12/site-packages/uvicorn/__init__.py'> File "/home/tigran/.local/lib/python3.12/site-packages/uvicorn/main.py", line 593, in run server.run() │ └ <function Server.run at 0x7f5e7eabeca0> └ <uvicorn.server.Server object at 0x7f5cd64b3e90> File "/home/tigran/.local/lib/python3.12/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 0x7f5e7ea5b380> │ │ │ │ │ └ <uvicorn.config.Config object at 0x7f5e7f552840> │ │ │ │ └ <uvicorn.server.Server object at 0x7f5cd64b3e90> │ │ │ └ None │ │ └ <function Server.serve at 0x7f5e7eabed40> │ └ <uvicorn.server.Server object at 0x7f5cd64b3e90> └ <function run at 0x7f5e7eb5e480> File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run return runner.run(main) │ │ └ <coroutine object Server.serve at 0x7f5e7e9cf680> │ └ <function Runner.run at 0x7f5e7eb75760> └ <asyncio.runners.Runner object at 0x7f5cd65a0b00> File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /home/tigran/.local/lib/python3.12/site-packages/uvicorn/server.p... │ │ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7f5cd65a0b00> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/main.py", line 1624, in process_chat form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7f5d02b18900> │ └ {'user_id': 'cdb67ffa-03ad-442d-a4ca-e63eeb133b06', 'chat_id': '04bc37cc-5014-4f2b-a41d-f89971656a7e', 'message_id': '37ed5d0... └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us... File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 1506, in process_chat_payload form_data, flags = await chat_completion_files_handler( │ └ <function chat_completion_files_handler at 0x7f5d02b187c0> └ {'stream': True, 'model': 'gpt-oss:120b-cloud', 'messages': [{'role': 'system', 'content': 'User Context:\n\n'}, {'role': 'us... File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/utils/middleware.py", line 989, in chat_completion_files_handler sources = await get_sources_from_items( └ <function get_sources_from_items at 0x7f5d3889a020> > File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 1162, in get_sources_from_items query_result = await query_collection( └ <function query_collection at 0x7f5d38899760> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 427, in query_collection query_embeddings = await embedding_function( └ <function chat_completion_files_handler.<locals>.<lambda> at 0x7f5cccdf7920> File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 790, in async_embedding_function return await asyncio.to_thread( │ └ <function to_thread at 0x7f5e7eb89e40> └ <module 'asyncio' from '/usr/local/lib/python3.12/asyncio/__init__.py'> File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread return await loop.run_in_executor(None, func_call) │ │ └ functools.partial(<built-in method run of _contextvars.Context object at 0x7f5cd655dcc0>, <function get_embedding_function.<l... │ └ <method 'run_in_executor' of 'uvloop.loop.Loop' objects> └ <uvloop.Loop running=True closed=False debug=False> File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) │ │ └ None │ └ None └ None File "/home/tigran/.local/lib/python3.12/site-packages/open_webui/retrieval/utils.py", line 792, in <lambda> lambda query, prefix=None: embedding_function.encode( │ └ None └ ['Дай мне список самых свежих новостей, со ссылками на источники. Используй веб поиск.'] AttributeError: 'NoneType' object has no attribute 'encode' ### Additional Information _No response_ ```
GiteaMirror added the bug label 2026-05-05 21:29:44 -05:00
Author
Owner

@owui-terminator[bot] commented on GitHub (Dec 17, 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:

  1. #19698 issue: .41 web based search and webpages - RAG - are not fixed
    by frenzybiscuit • Dec 02, 2025 • bug

  2. #19864 issue:
    by Haervwe • Dec 10, 2025 • bug

  3. #19777 issue:
    by Yaute7 • Dec 05, 2025 • bug

  4. #19877 issue:
    by dotmobo • Dec 11, 2025 • bug

  5. #19925 issue: Model responses stop after web searches
    by tm-coder-484 • Dec 13, 2025 • bug

Show 5 more related issues
  1. #19861 issue:
    by QuitHub • Dec 10, 2025 • bug

  2. #19755 issue: Error: 404, message='Not Found', url='http://ollama:11434/api/embed'
    by stevewillett • Dec 04, 2025 • bug

  3. #19211 issue:
    by Byrnes9 • Nov 16, 2025 • bug

  4. #19563 issue:
    by naruto7g • Nov 28, 2025 • bug

  5. #16875 issue: Web Search Not Working with OpenWebUI-Assistant-OpenAI Function
    by YazinAlhamdi • Aug 24, 2025 • bug


💡 Tips:

  • If this is a duplicate, please consider closing this issue and adding any additional details to the existing one
  • If you found a solution in any of these issues, please share it here to help others

This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.

<!-- gh-comment-id:3664566757 --> @owui-terminator[bot] commented on GitHub (Dec 17, 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: 1. [#19698](https://github.com/open-webui/open-webui/issues/19698) **issue: .41 web based search and webpages - RAG - are not fixed** *by frenzybiscuit • Dec 02, 2025 • `bug`* 2. [#19864](https://github.com/open-webui/open-webui/issues/19864) **issue:** *by Haervwe • Dec 10, 2025 • `bug`* 3. [#19777](https://github.com/open-webui/open-webui/issues/19777) **issue:** *by Yaute7 • Dec 05, 2025 • `bug`* 4. [#19877](https://github.com/open-webui/open-webui/issues/19877) **issue:** *by dotmobo • Dec 11, 2025 • `bug`* 5. [#19925](https://github.com/open-webui/open-webui/issues/19925) **issue: Model responses stop after web searches** *by tm-coder-484 • Dec 13, 2025 • `bug`* <details> <summary>Show 5 more related issues</summary> 6. [#19861](https://github.com/open-webui/open-webui/issues/19861) **issue:** *by QuitHub • Dec 10, 2025 • `bug`* 7. [#19755](https://github.com/open-webui/open-webui/issues/19755) **issue: Error: 404, message='Not Found', url='http://ollama:11434/api/embed'** *by stevewillett • Dec 04, 2025 • `bug`* 8. [#19211](https://github.com/open-webui/open-webui/issues/19211) **issue:** *by Byrnes9 • Nov 16, 2025 • `bug`* 9. [#19563](https://github.com/open-webui/open-webui/issues/19563) **issue:** *by naruto7g • Nov 28, 2025 • `bug`* 10. [#16875](https://github.com/open-webui/open-webui/issues/16875) **issue: Web Search Not Working with OpenWebUI-Assistant-OpenAI Function** *by YazinAlhamdi • Aug 24, 2025 • `bug`* </details> --- 💡 **Tips:** - If this is a duplicate, please consider closing this issue and adding any additional details to the existing one - If you found a solution in any of these issues, please share it here to help others *This comment was generated automatically by a bot.* Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
Author
Owner

@tigran123 commented on GitHub (Dec 17, 2025):

I forgot to mention that I did enable "Web Search" in the "Integrations" at the bottom and I entered my BRAVE API in the Settings of Open WebUI, to enable web searching. It used to work before...

<!-- gh-comment-id:3664580405 --> @tigran123 commented on GitHub (Dec 17, 2025): I forgot to mention that I did enable "Web Search" in the "Integrations" at the bottom and I entered my BRAVE API in the Settings of Open WebUI, to enable web searching. It used to work before...
Author
Owner

@tigran123 commented on GitHub (Dec 17, 2025):

Excuse me, why was this closed? I checked the issue referred and there is no solution there. Of course I set the number of concurrent requests to 1 -- that is the first that occurred to me (when I saw in the logs "too many concurrent requests" error). However, this did NOT solve the issue. So, what is the solution? Please reopen the issue and investigate or suggest a workaround. Thank you.

<!-- gh-comment-id:3664688415 --> @tigran123 commented on GitHub (Dec 17, 2025): Excuse me, why was this closed? I checked the issue referred and there is no solution there. Of course I set the number of concurrent requests to 1 -- that is the first that occurred to me (when I saw in the logs "too many concurrent requests" error). However, this did NOT solve the issue. So, what is the solution? Please reopen the issue and investigate or suggest a workaround. Thank you.
Author
Owner

@Classic298 commented on GitHub (Dec 17, 2025):

@tigran123 there is no solution yet. It's a known issue and this has nothing to do with concurrent requests. That setting is for something else

It was closed because you opened yet another duplicate for an issue that is already being tracked.

Duplicates should not be created!

<!-- gh-comment-id:3664937372 --> @Classic298 commented on GitHub (Dec 17, 2025): @tigran123 there is no solution yet. It's a known issue and this has nothing to do with concurrent requests. That setting is for something else It was closed because you opened yet another duplicate for an issue that is already being tracked. Duplicates should not be created!
Author
Owner

@tigran123 commented on GitHub (Dec 17, 2025):

Ok, I upgraded to the paid tier ($3 for 1000 requests) and it seems to work now.

<!-- gh-comment-id:3664942404 --> @tigran123 commented on GitHub (Dec 17, 2025): Ok, I upgraded to the paid tier ($3 for 1000 requests) and it seems to work now.
Author
Owner

@Classic298 commented on GitHub (Dec 21, 2025):

should be addressed by

https://github.com/open-webui/open-webui/pull/20070

<!-- gh-comment-id:3678748290 --> @Classic298 commented on GitHub (Dec 21, 2025): should be addressed by https://github.com/open-webui/open-webui/pull/20070
Author
Owner

@tigran123 commented on GitHub (Dec 21, 2025):

Thank you! I will try the next release.

<!-- gh-comment-id:3678775580 --> @tigran123 commented on GitHub (Dec 21, 2025): Thank you! I will try the next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#57726