# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settingsuse_default_settings:engines:keep_only:- bingserver:# base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.ymlsecret_key:"***"# change this!limiter:false# can be disabled for a private instanceimage_proxy:trueui:static_use_hash:trueredis:url:redis://redis:6379/0search:formats:- jsonengines:- name:bingdisabled:false
admin panel settings:
Environment
Open WebUI Version: latest
Ollama (if applicable): not installed
Operating System: host: ubuntu22.04
Browser (if applicable): latest edge on Windows10
Confirmation:
[x ] I have read and followed all the instructions provided in the README.md.
[ x] I am on the latest version of both Open WebUI and Ollama.
[x ] I have included the Docker container logs.
[x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
Behavior:
Firstly, it comes out "Error searching "
the logs show that the query string is empty
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, in chat_web_search_handler
results= await loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result= self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/utils/middleware.py", line 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1324, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: 400 Client Error: BAD REQUEST for url: http://172.17.0.1:8080/search?q=&q=&format=json&pageno=1&safesearch=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0
after several tries, it comes out "No search query generated", and there are no logs from open-webui or searxng
Originally created by @water2004 on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9995
# Bug Report
## Installation Method
I install open-webui using docker without ollama
```sh
docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
```
And then install searxng using docker compose, `docker-compose.yml` is shown as below
```yml
version: "3.7"
services:
redis:
container_name: redis
image: docker.1ms.run/valkey/valkey:8-alpine
command: valkey-server --save 30 1 --loglevel warning
restart: unless-stopped
networks:
- searxng
volumes:
- valkey-data2:/data
cap_drop:
- ALL
cap_add:
- SETGID
- SETUID
- DAC_OVERRIDE
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
searxng:
container_name: searxng
image: docker.1ms.run/searxng/searxng:latest
restart: unless-stopped
networks:
- searxng
ports:
- "0.0.0.0:8080:8080"
volumes:
- ./searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- DAC_OVERRIDE
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
networks:
searxng:
volumes:
caddy-data:
caddy-config:
valkey-data2:
```
`settings.yml`
```yml
# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings
use_default_settings:
engines:
keep_only:
- bing
server:
# base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml
secret_key: "***" # change this!
limiter: false # can be disabled for a private instance
image_proxy: true
ui:
static_use_hash: true
redis:
url: redis://redis:6379/0
search:
formats:
- json
engines:
- name: bing
disabled: false
```
admin panel settings:

## Environment
- **Open WebUI Version:** latest
- **Ollama (if applicable):** not installed
- **Operating System:** host: ubuntu22.04
- **Browser (if applicable):** latest edge on Windows10
**Confirmation:**
- [x ] I have read and followed all the instructions provided in the README.md.
- [ x] I am on the latest version of both Open WebUI and Ollama.
- [x ] I have included the Docker container logs.
- [x ] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.
## Behavior:
Firstly, it comes out "Error searching "

the logs show that the query string is empty
```sh
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, in chat_web_search_handler
results = await loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/utils/middleware.py", line 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1324, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: 400 Client Error: BAD REQUEST for url: http://172.17.0.1:8080/search?q=&q=&format=json&pageno=1&safesearch=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0
```
log of searxng:
```sh
2025-02-14 10:24:12,076 WARNING:searx.engines.bing: ErrorContext('searx/search/processors/online.py', 125, 'count_error(', None, '1 redirects, maximum: 0', ('200', 'OK', 'cn.bing.com')) True
```
after several tries, it comes out "No search query generated", and there are no logs from open-webui or searxng

This happens when the reponse generated by the LLM isn't correctly formatted as required by the web search (should be an array of queries). This error depends on the model used and its ability to respect its system prompt.
<!-- gh-comment-id:2659711871 -->
@Mavyre commented on GitHub (Feb 14, 2025):
This happens when the reponse generated by the LLM isn't correctly formatted as required by the web search (should be an array of queries). This error depends on the model used and its ability to respect its system prompt.
This happens when the reponse generated by the LLM isn't correctly formatted as required by the web search (should be an array of queries). This error depends on the model used and its ability to respect its system prompt.
I am having this exact issue and continue to get this error message (even though it will show that it received three search results):
SyntaxError: The string did not match the expected pattern.
I had no issues until after 5.9. I have no idea what go broken but it is definitely on OpenWebUI’s side and not Searxng because I have tested the API outside of OpenWebUI without issue.
<!-- gh-comment-id:2659772439 -->
@technofox01 commented on GitHub (Feb 14, 2025):
> This happens when the reponse generated by the LLM isn't correctly formatted as required by the web search (should be an array of queries). This error depends on the model used and its ability to respect its system prompt.
I am having this exact issue and continue to get this error message (even though it will show that it received three search results):
SyntaxError: The string did not match the expected pattern.
I had no issues until after 5.9. I have no idea what go broken but it is definitely on OpenWebUI’s side and not Searxng because I have tested the API outside of OpenWebUI without issue.
Also here. However, I could not confirm whether SearXNG or Open WebUI goes wrong. If I run http://searxng:8080/search?q=hello&format=json, it returns:
{
"query": "hello",
"number_of_results": 0,
"results": [
{
"title": "HELLO | English meaning - Cambridge Dictionary",
"url": "https://dictionary.cambridge.org/dictionary/english/hello",
"content": "Learn the meaning and usage of the word hello in English, with synonyms, pronunciation, and translations. Find out how to say hello in different situations, such as greeting someone, answering the phone, or attracting attention.",
"engine": "duckduckgo",
"template": "default.html",
"parsed_url": [
"https",
"dictionary.cambridge.org",
"/dictionary/english/hello",
"",
"",
""
],
...
It's weird because there are exactly some results while number_of_results is 0. But it seems not to be a fatal bug as https://github.com/searxng/searxng/issues/2457 just discussed.
My Open WebUI and SearXNG docker instances run on WSL2. Expecting for any helpful fixes or anwsers.
<!-- gh-comment-id:2659872974 -->
@IndigoFloyd commented on GitHub (Feb 14, 2025):
Also here. However, I could not confirm whether SearXNG or Open WebUI goes wrong. If I run `http://searxng:8080/search?q=hello&format=json`, it returns:
```
{
"query": "hello",
"number_of_results": 0,
"results": [
{
"title": "HELLO | English meaning - Cambridge Dictionary",
"url": "https://dictionary.cambridge.org/dictionary/english/hello",
"content": "Learn the meaning and usage of the word hello in English, with synonyms, pronunciation, and translations. Find out how to say hello in different situations, such as greeting someone, answering the phone, or attracting attention.",
"engine": "duckduckgo",
"template": "default.html",
"parsed_url": [
"https",
"dictionary.cambridge.org",
"/dictionary/english/hello",
"",
"",
""
],
...
```
It's weird because there are exactly some results while `number_of_results` is `0`. But it seems not to be a fatal bug as [https://github.com/searxng/searxng/issues/2457](url) just discussed.
My Open WebUI and SearXNG docker instances run on WSL2. Expecting for any helpful fixes or anwsers.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @water2004 on GitHub (Feb 14, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9995
Bug Report
Installation Method
I install open-webui using docker without ollama
And then install searxng using docker compose,
docker-compose.ymlis shown as belowsettings.ymladmin panel settings:
Environment
Open WebUI Version: latest
Ollama (if applicable): not installed
Operating System: host: ubuntu22.04
Browser (if applicable): latest edge on Windows10
Confirmation:
Behavior:
Firstly, it comes out "Error searching "
the logs show that the query string is empty
log of searxng:
after several tries, it comes out "No search query generated", and there are no logs from open-webui or searxng
@water2004 commented on GitHub (Feb 14, 2025):
searxng works well, I can get the result json file by browser
url:
***:8080/search?q=weather&format=json@Mavyre commented on GitHub (Feb 14, 2025):
This happens when the reponse generated by the LLM isn't correctly formatted as required by the web search (should be an array of queries). This error depends on the model used and its ability to respect its system prompt.
@technofox01 commented on GitHub (Feb 14, 2025):
I am having this exact issue and continue to get this error message (even though it will show that it received three search results):
SyntaxError: The string did not match the expected pattern.
I had no issues until after 5.9. I have no idea what go broken but it is definitely on OpenWebUI’s side and not Searxng because I have tested the API outside of OpenWebUI without issue.
@IndigoFloyd commented on GitHub (Feb 14, 2025):
Also here. However, I could not confirm whether SearXNG or Open WebUI goes wrong. If I run
http://searxng:8080/search?q=hello&format=json, it returns:It's weird because there are exactly some results while
number_of_resultsis0. But it seems not to be a fatal bug as https://github.com/searxng/searxng/issues/2457 just discussed.My Open WebUI and SearXNG docker instances run on WSL2. Expecting for any helpful fixes or anwsers.