[GH-ISSUE #2797] SearXNG web search with openwebui,got this error Expecting value: line 1 column 1 (char 0) #13016

Closed
opened 2026-04-19 19:50:02 -05:00 by GiteaMirror · 15 comments
Owner

Originally created by @KnoxCheung on GitHub (Jun 4, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/2797

Expecting value: line 1 column 1 (char 0)

スクリーンショット 2024-06-04 午前11 08 04
スクリーンショット 2024-06-04 午前11 05 56

both run on docker

port 3001 for openwebui

port 8080 for searxng

スクリーンショット 2024-06-04 午前11 09 40

I am a novice of programming ,sorry to bother you guys. Thanks for your help

Originally created by @KnoxCheung on GitHub (Jun 4, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/2797 Expecting value: line 1 column 1 (char 0) ![スクリーンショット 2024-06-04 午前11 08 04](https://github.com/open-webui/open-webui/assets/162684964/790efe01-bcfd-469b-b374-e33ec94dff7f) ![スクリーンショット 2024-06-04 午前11 05 56](https://github.com/open-webui/open-webui/assets/162684964/2cf3b876-4744-42e7-9249-2618e6c506b4) both run on docker port 3001 for openwebui port 8080 for searxng <img width="1223" alt="スクリーンショット 2024-06-04 午前11 09 40" src="https://github.com/open-webui/open-webui/assets/162684964/940267af-e9e7-4c81-9661-0d95dfd389ed"> I am a novice of programming ,sorry to bother you guys. Thanks for your help
Author
Owner

@justinh-rahb commented on GitHub (Jun 4, 2024):

We've pushed some updates to fix a bad PR merge, re-pull and re-run your container.

<!-- gh-comment-id:2146462465 --> @justinh-rahb commented on GitHub (Jun 4, 2024): We've pushed some updates to fix a bad PR merge, re-pull and re-run your container.
Author
Owner

@tjbck commented on GitHub (Jun 4, 2024):

Closing this issue, Let us know if the issue persists!

<!-- gh-comment-id:2146488802 --> @tjbck commented on GitHub (Jun 4, 2024): Closing this issue, Let us know if the issue persists!
Author
Owner

@KnoxCheung commented on GitHub (Jun 4, 2024):

I hv update to 0.2.3, but still the same error
ollama is also the newest version

<!-- gh-comment-id:2146548547 --> @KnoxCheung commented on GitHub (Jun 4, 2024): I hv update to 0.2.3, but still the same error ollama is also the newest version
Author
Owner

@tjbck commented on GitHub (Jun 4, 2024):

Try 0.2.4, and let us know if the issue persists!

<!-- gh-comment-id:2146585228 --> @tjbck commented on GitHub (Jun 4, 2024): Try 0.2.4, and let us know if the issue persists!
Author
Owner

@KnoxCheung commented on GitHub (Jun 4, 2024):

Sorry to bother you guys,still the same error, i hv updated to 0.2.4,is there something need to be configure in openwebui or searxng?Searxng works fine in localhost:8080.

<!-- gh-comment-id:2146603483 --> @KnoxCheung commented on GitHub (Jun 4, 2024): Sorry to bother you guys,still the same error, i hv updated to 0.2.4,is there something need to be configure in openwebui or searxng?Searxng works fine in localhost:8080.
Author
Owner

@tjbck commented on GitHub (Jun 4, 2024):

If both environments are on docker, I don't think the url should be localhost. Try host.docker.internal.

<!-- gh-comment-id:2146626719 --> @tjbck commented on GitHub (Jun 4, 2024): If both environments are on docker, I don't think the url should be `localhost`. Try `host.docker.internal`.
Author
Owner

@KnoxCheung commented on GitHub (Jun 4, 2024):

If both environments are on docker, I don't think the url should be localhost. Try host.docker.internal.

It finally works!!! thanks a lot bro.

<!-- gh-comment-id:2146669028 --> @KnoxCheung commented on GitHub (Jun 4, 2024): > If both environments are on docker, I don't think the url should be `localhost`. Try `host.docker.internal`. It finally works!!! thanks a lot bro.
Author
Owner

@cojarbi commented on GitHub (Jun 10, 2024):

Hi guys, having this same issue, im getting that same error with not internet search. using searxng localhost for searxng works fine.
open-webui v0.3.1
Ollama 0.1.42

How did you make it work @KnoxCheung

<!-- gh-comment-id:2158499745 --> @cojarbi commented on GitHub (Jun 10, 2024): Hi guys, having this same issue, im getting that same error with not internet search. using searxng localhost for searxng works fine. open-webui v0.3.1 Ollama 0.1.42 How did you make it work @KnoxCheung
Author
Owner

@KnoxCheung commented on GitHub (Jun 11, 2024):

Hi guys, having this same issue, im getting that same error with not internet search. using searxng localhost for searxng works fine. open-webui v0.3.1 Ollama 0.1.42

How did you make it work @KnoxCheung
The URL should be host.docker.internal, not localhost (thanks to tjbak's reply)

@cojarbi

<!-- gh-comment-id:2159536316 --> @KnoxCheung commented on GitHub (Jun 11, 2024): > Hi guys, having this same issue, im getting that same error with not internet search. using searxng localhost for searxng works fine. open-webui v0.3.1 Ollama 0.1.42 > > How did you make it work @KnoxCheung The URL should be host.docker.internal, not localhost (thanks to tjbak's reply) @cojarbi
Author
Owner

@sumansahoo1 commented on GitHub (Jun 13, 2024):

image

I'm having this error after changing localhost to host.docker.internal
My versions are -
image

<!-- gh-comment-id:2165307114 --> @sumansahoo1 commented on GitHub (Jun 13, 2024): ![image](https://github.com/open-webui/open-webui/assets/75962762/301f7821-e5b4-4493-8615-c2430223933c) I'm having this error after changing ```localhost``` to ```host.docker.internal``` My versions are - ![image](https://github.com/open-webui/open-webui/assets/75962762/0ac61970-9041-4101-8f24-93d120f4cd30)
Author
Owner

@silentoplayz commented on GitHub (Jun 13, 2024):

I'm having this error after changing localhost to host.docker.internal My versions are - image

@suman-somu And are both Open WebUI and Ollama running in Docker for you?

<!-- gh-comment-id:2165641497 --> @silentoplayz commented on GitHub (Jun 13, 2024): > I'm having this error after changing `localhost` to `host.docker.internal` My versions are - ![image](https://private-user-images.githubusercontent.com/75962762/339330476-0ac61970-9041-4101-8f24-93d120f4cd30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgyODQ3MDIsIm5iZiI6MTcxODI4NDQwMiwicGF0aCI6Ii83NTk2Mjc2Mi8zMzkzMzA0NzYtMGFjNjE5NzAtOTA0MS00MTAxLThmMjQtOTNkMTIwZjRjZDMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjEzVDEzMTMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczYjg4ODg4NTc2NWVmNTVkODcyMzUwY2I3ODM2NzViZjc4N2Q1ZWE2MDc2YzhkNTFhYjIxMjk2MDEwNTk3MzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mtguv5WQetFD5BPgFNXRBhJkJLZdgxmxbDUpjY5INmw) @suman-somu And are both Open WebUI and Ollama running in Docker for you?
Author
Owner

@sumansahoo1 commented on GitHub (Jun 13, 2024):

@suman-somu And are both Open WebUI and Ollama running in Docker for you?

yep

<!-- gh-comment-id:2166426712 --> @sumansahoo1 commented on GitHub (Jun 13, 2024): > @suman-somu And are both Open WebUI and Ollama running in Docker for you? yep
Author
Owner

@cediorio commented on GitHub (Jun 18, 2024):

@suman-somu And are both Open WebUI and Ollama running in Docker for you?

yep

Try http://host.docker.internal:8000/v1 for SearXNG Query URL, https://docs.openwebui.com/tutorial/openedai-speech-integration

Did this work for anyone? When I try the http://host.docker.internal:8000/v1, I get: HTTPConnectionPool(host='host.docker.internal', port=8000): Max retries exceeded with url: /v1?q=test&format=json&pageno=1&safesearch=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x735535b5d510>: Failed to establish a new connection: [Errno 111] Connection refused'))

I've had the same exact problems noted in this thread: host.docker.internal returns 403, while localhost gives the "Expecting value" error. Both open-webui and searxing running in unmodified docker containers, open-webui:cuda running 0.3.5.

<!-- gh-comment-id:2175870522 --> @cediorio commented on GitHub (Jun 18, 2024): > > > @suman-somu And are both Open WebUI and Ollama running in Docker for you? > > > > > > yep > > Try `http://host.docker.internal:8000/v1` for `SearXNG Query URL`, https://docs.openwebui.com/tutorial/openedai-speech-integration Did this work for anyone? When I try the `http://host.docker.internal:8000/v1`, I get: `HTTPConnectionPool(host='host.docker.internal', port=8000): Max retries exceeded with url: /v1?q=test&format=json&pageno=1&safesearch=1&language=en-US&time_range=&categories=&theme=simple&image_proxy=0 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x735535b5d510>: Failed to establish a new connection: [Errno 111] Connection refused'))` I've had the same exact problems noted in this thread: host.docker.internal returns 403, while localhost gives the "Expecting value" error. Both open-webui and searxing running in unmodified docker containers, open-webui:cuda running 0.3.5.
Author
Owner

@rwestberg commented on GitHub (Jun 24, 2024):

image

I'm having this error after changing localhost to host.docker.internal My versions are - image

Looks like the default settings for searxng is to disallow search results in json. I had to edit my settings.yml to add it:

  # remove format to deny access, use lower case.
  # formats: [html, csv, json, rss]
  formats:
    - html
    - json

After that the 403 error went away and things seem to work!

<!-- gh-comment-id:2186712272 --> @rwestberg commented on GitHub (Jun 24, 2024): > ![image](https://private-user-images.githubusercontent.com/75962762/339329412-301f7821-e5b4-4493-8615-c2430223933c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMzgwOTQsIm5iZiI6MTcxOTIzNzc5NCwicGF0aCI6Ii83NTk2Mjc2Mi8zMzkzMjk0MTItMzAxZjc4MjEtZTViNC00NDkzLTg2MTUtYzI0MzAyMjM5MzNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDE0MDMxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVlNjRlMGFkMGUwODJmYzI2YmZhNTAzYzE0NWVkODU0NWM3NzFiY2YzZTllZDkyODczZWQ1ZTUwNGMwODJhMGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LZ6BsCqfrE26cS2ccS4J6Z6hwphgKS7ZNCY0rUsMRXA) > > I'm having this error after changing `localhost` to `host.docker.internal` My versions are - ![image](https://private-user-images.githubusercontent.com/75962762/339330476-0ac61970-9041-4101-8f24-93d120f4cd30.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkyMzgwOTQsIm5iZiI6MTcxOTIzNzc5NCwicGF0aCI6Ii83NTk2Mjc2Mi8zMzkzMzA0NzYtMGFjNjE5NzAtOTA0MS00MTAxLThmMjQtOTNkMTIwZjRjZDMwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjI0VDE0MDMxNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhOGQ1MzMwZWUwNmMxYmFkY2YyOGYwMmI5NTExMTM2YjgwMTJhODM0ZjhlZDhiZTdmZTY2M2JhYWEyZDc5ZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.chYOmeFoVUsF2xrDsE2vqzhtRSPRYiQazwBEagG9EYQ) Looks like the default settings for searxng is to disallow search results in json. I had to edit my settings.yml to add it: ``` # remove format to deny access, use lower case. # formats: [html, csv, json, rss] formats: - html - json ``` After that the 403 error went away and things seem to work!
Author
Owner

@JasonOdinberg commented on GitHub (Dec 16, 2024):

For everyone who gets an error ,you need to edit the settings.yml , given that you've installed searxng with docker, make sure to start the container and then click on it , go to files , etc/searxng/settings.yml (right click and edit file) and the part that you need to change should be around line 78 ,

formats:
    - html
It is missing the -json line most of the times , so add it.
  formats:
    - html
    - json

Additionally inside openwebui ,for Searxng Query URL add http://host.docker.internal:8080/search?q=<query>

<!-- gh-comment-id:2546530433 --> @JasonOdinberg commented on GitHub (Dec 16, 2024): For everyone who gets an error ,you need to edit the settings.yml , given that you've installed searxng with docker, make sure to start the container and then click on it , go to files , etc/searxng/settings.yml (right click and edit file) and the part that you need to change should be around line 78 , ``` formats: - html It is missing the -json line most of the times , so add it. formats: - html - json ``` Additionally inside openwebui ,for **Searxng Query URL** add `http://host.docker.internal:8080/search?q=<query>`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#13016