Open webui do not start with docker #713

Closed
opened 2025-11-11 14:29:37 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @flefevre on GitHub (Apr 24, 2024).

Bug Report

Description

Bug Summary:
Open webui do not start on docker due to
OPENAI_API_BASE_URLS.index("https://api.openai.com/v1")

Steps to Reproduce:
Just start a new docker for open webui

- OPENAI_API_BASE_URLS=http://litellm:8000/v1 - OPENAI_API_KEYS=sk-titi

it do not start

if you add in the docker compose file
- OPENAI_API_BASE_URLS=http://litellm:8000/v1;https://api.openai.com/v1 - OPENAI_API_KEYS=sk-titi;sk-toto

with the url of api.openai.com
then it is starting, even if i do not have any sk for openai

Expected Behavior:
the server should start

Actual Behavior:
the server exit

Environment

  • **Open WebUI Version:v0.1.120

Reproduction Details

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.

Logs and Screenshots

Docker Container Logs:
openwebui | File "/usr/local/bin/uvicorn", line 8, in <module> openwebui | sys.exit(main()) openwebui | ^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ openwebui | return self.main(*args, **kwargs) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main openwebui | rv = self.invoke(ctx) openwebui | ^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke openwebui | return ctx.invoke(self.callback, **ctx.params) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke openwebui | return __callback(*args, **kwargs) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main openwebui | run( openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run openwebui | server.run() openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run openwebui | return asyncio.run(self.serve(sockets=sockets)) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run openwebui | return runner.run(main) openwebui | ^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run openwebui | return self._loop.run_until_complete(task) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve openwebui | await self._serve(sockets) openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve openwebui | config.load() openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load openwebui | self.loaded_app = import_from_string(self.app) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string openwebui | module = importlib.import_module(module_str) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module openwebui | return _bootstrap._gcd_import(name[level:], package, level) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "<frozen importlib._bootstrap>", line 1204, in _gcd_import openwebui | File "<frozen importlib._bootstrap>", line 1176, in _find_and_load openwebui | File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked openwebui | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked openwebui | File "<frozen importlib._bootstrap_external>", line 940, in exec_module openwebui | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed openwebui | File "/app/backend/main.py", line 20, in <module> openwebui | from apps.ollama.main import app as ollama_app openwebui | File "/app/backend/apps/ollama/main.py", line 31, in <module> openwebui | from apps.web.models.users import Users openwebui | File "/app/backend/apps/web/models/users.py", line 8, in <module> openwebui | from apps.web.internal.db import DB openwebui | File "/app/backend/apps/web/internal/db.py", line 3, in <module> openwebui | from config import SRC_LOG_LEVELS, DATA_DIR openwebui | File "/app/backend/config.py", line 326, in <module> openwebui | OPENAI_API_BASE_URLS.index("https://api.openai.com/v1") openwebui | ValueError: 'https://api.openai.com/v1' is not in list openwebui exited with code 0

Installation Method

[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.]

Additional Information

[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @flefevre on GitHub (Apr 24, 2024). # Bug Report ## Description **Bug Summary:** Open webui do not start on docker due to ` OPENAI_API_BASE_URLS.index("https://api.openai.com/v1")` **Steps to Reproduce:** Just start a new docker for open webui ` - OPENAI_API_BASE_URLS=http://litellm:8000/v1 - OPENAI_API_KEYS=sk-titi` it do not start if you add in the docker compose file ` - OPENAI_API_BASE_URLS=http://litellm:8000/v1;https://api.openai.com/v1 - OPENAI_API_KEYS=sk-titi;sk-toto` with the url of api.openai.com then it is starting, even if i do not have any sk for openai **Expected Behavior:** the server should start **Actual Behavior:** the server exit ## Environment - **Open WebUI Version:v0.1.120 ## Reproduction Details **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. ## Logs and Screenshots **Docker Container Logs:** `openwebui | File "/usr/local/bin/uvicorn", line 8, in <module> openwebui | sys.exit(main()) openwebui | ^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ openwebui | return self.main(*args, **kwargs) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main openwebui | rv = self.invoke(ctx) openwebui | ^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke openwebui | return ctx.invoke(self.callback, **ctx.params) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke openwebui | return __callback(*args, **kwargs) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main openwebui | run( openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run openwebui | server.run() openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run openwebui | return asyncio.run(self.serve(sockets=sockets)) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run openwebui | return runner.run(main) openwebui | ^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run openwebui | return self._loop.run_until_complete(task) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve openwebui | await self._serve(sockets) openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve openwebui | config.load() openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load openwebui | self.loaded_app = import_from_string(self.app) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string openwebui | module = importlib.import_module(module_str) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module openwebui | return _bootstrap._gcd_import(name[level:], package, level) openwebui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ openwebui | File "<frozen importlib._bootstrap>", line 1204, in _gcd_import openwebui | File "<frozen importlib._bootstrap>", line 1176, in _find_and_load openwebui | File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked openwebui | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked openwebui | File "<frozen importlib._bootstrap_external>", line 940, in exec_module openwebui | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed openwebui | File "/app/backend/main.py", line 20, in <module> openwebui | from apps.ollama.main import app as ollama_app openwebui | File "/app/backend/apps/ollama/main.py", line 31, in <module> openwebui | from apps.web.models.users import Users openwebui | File "/app/backend/apps/web/models/users.py", line 8, in <module> openwebui | from apps.web.internal.db import DB openwebui | File "/app/backend/apps/web/internal/db.py", line 3, in <module> openwebui | from config import SRC_LOG_LEVELS, DATA_DIR openwebui | File "/app/backend/config.py", line 326, in <module> openwebui | OPENAI_API_BASE_URLS.index("https://api.openai.com/v1") openwebui | ValueError: 'https://api.openai.com/v1' is not in list openwebui exited with code 0 ` ## Installation Method [Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.] ## Additional Information [Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.] ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@justinh-rahb commented on GitHub (Apr 24, 2024):

Use the singular versions of those when only setting one.

OPENAI_API_BASE_URL
OPENAI_API_KEY
@justinh-rahb commented on GitHub (Apr 24, 2024): Use the singular versions of those when only setting one. ```ini OPENAI_API_BASE_URL OPENAI_API_KEY ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#713