Open WebUI - Missing Packages #1196

Closed
opened 2025-11-20 05:06:07 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @GTez on GitHub (May 29, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Open WebUI

📂 What was the exact command used to execute the script?

/usr/bin/update

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

📝 Provide a clear and concise description of the issue.

Upon updating Open WebUI would no longer start due to missing starlette-compress-1.6.0 This was not installed because the pip install -r requirements step in the update script fails to install it under root.

🔄 Steps to reproduce the issue.

Log into the box.
run /usr/bin/update
Update will show that the app fails to start.
Rebooting or restarting the app via systemctl start open-webui and like commands will fail

Paste the full error output (if available).

root@openwebui:/opt/open-webui/backend# ./start.sh
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Loading WEBUI_SECRET_KEY from .webui_secret_key
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/__main__.py", line 4, in <module>
    uvicorn.main()
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/main.py", line 412, in main
    run(
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/main.py", line 579, in run
    server.run()
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 70, in serve
    await self._serve(sockets)
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 77, in _serve
    config.load()
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/config.py", line 435, in load
    self.loaded_app = import_from_string(self.app)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/importer.py", line 22, in import_from_string
    raise exc from None
  File "/usr/local/lib/python3.11/dist-packages/uvicorn/importer.py", line 19, in import_from_string
    module = importlib.import_module(module_str)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/open-webui/backend/open_webui/main.py", line 43, in <module>
    from starlette_compress import CompressMiddleware
ModuleNotFoundError: No module named 'starlette_compress'

🖼️ Additional context (optional).

I was able to fix it via root@openwebui:/opt/open-webui/backend# $STD pip install -r requirements.txt --break-system-packages

This is just adding --break-system-packages to the command run by the script. I don't know if this is an ideal fix though, so I didn't want to propose it as a pull request.

Originally created by @GTez on GitHub (May 29, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Open WebUI ### 📂 What was the exact command used to execute the script? /usr/bin/update ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 📝 Provide a clear and concise description of the issue. Upon updating Open WebUI would no longer start due to missing `starlette-compress-1.6.0` This was not installed because the `pip install -r requirements` step in the update script fails to install it under root. ### 🔄 Steps to reproduce the issue. Log into the box. run `/usr/bin/update` Update will show that the app fails to start. Rebooting or restarting the app via `systemctl start open-webui` and like commands will fail ### ❌ Paste the full error output (if available). ``` root@openwebui:/opt/open-webui/backend# ./start.sh Loading WEBUI_SECRET_KEY from file, not provided as an environment variable. Loading WEBUI_SECRET_KEY from .webui_secret_key Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/local/lib/python3.11/dist-packages/uvicorn/__main__.py", line 4, in <module> uvicorn.main() File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/uvicorn/main.py", line 412, in main run( File "/usr/local/lib/python3.11/dist-packages/uvicorn/main.py", line 579, in run server.run() File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 66, in run return asyncio.run(self.serve(sockets=sockets)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 70, in serve await self._serve(sockets) File "/usr/local/lib/python3.11/dist-packages/uvicorn/server.py", line 77, in _serve config.load() File "/usr/local/lib/python3.11/dist-packages/uvicorn/config.py", line 435, in load self.loaded_app = import_from_string(self.app) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/dist-packages/uvicorn/importer.py", line 22, in import_from_string raise exc from None File "/usr/local/lib/python3.11/dist-packages/uvicorn/importer.py", line 19, in import_from_string module = importlib.import_module(module_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/opt/open-webui/backend/open_webui/main.py", line 43, in <module> from starlette_compress import CompressMiddleware ModuleNotFoundError: No module named 'starlette_compress' ``` ### 🖼️ Additional context (optional). I was able to fix it via `root@openwebui:/opt/open-webui/backend# $STD pip install -r requirements.txt --break-system-packages` This is just adding --break-system-packages to the command run by the script. I don't know if this is an ideal fix though, so I didn't want to propose it as a pull request.
saavagebueno added the bug label 2025-11-20 05:06:07 -05:00
Author
Owner

@MickLesk commented on GitHub (May 30, 2025):

Not needed. Its an Python3 Issue Not an Script issue.

Migration to uv in next 2-3 weeks

@MickLesk commented on GitHub (May 30, 2025): Not needed. Its an Python3 Issue Not an Script issue. Migration to uv in next 2-3 weeks
Author
Owner

@GTez commented on GitHub (May 30, 2025):

Totally accept that you're not going to fix it. I am just adding this comment to make sure that I am being clear in the report. As it stands, for some subset of users (myself being one of them) running the update script will brick the box. I'm happy to submit a fix via changing the script to override the system packages while we wait for the move to uv from pip.

@GTez commented on GitHub (May 30, 2025): Totally accept that you're not going to fix it. I am just adding this comment to make sure that I am being clear in the report. As it stands, for some subset of users (myself being one of them) running the update script will brick the box. I'm happy to submit a fix via changing the script to override the system packages while we wait for the move to uv from pip.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#1196