mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #17606] issue: 0.6.30 fails to start with "Secondary flag is not valid for non-boolean flag" error message #18343
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tigran123 on GitHub (Sep 19, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17606
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
0.6.30
Ollama Version (if applicable)
0.12.0
Operating System
Ubuntu Linux 22.04.5
Browser (if applicable)
Chrome 140.0.7339.185
Confirmation
README.md.Expected Behavior
The command
open-webui serveshould start an Open WebUI server on port 8080 of localhost.Actual Behavior
The command exits with the following error:
Steps to Reproduce
Logs & Screenshots
$ open-webui serve
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/tigran/.local/bin/open-webui:8 in │
│ │
│ 5 from open_webui import app │
│ 6 if name == 'main': │
│ 7 │ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) │
│ ❱ 8 │ sys.exit(app()) │
│ 9 │
│ │
│ ╭────────────────────────────── locals ───────────────────────────────╮ │
│ │ app = <typer.main.Typer object at 0x78367eedba40> │ │
│ │ re = <module 're' from '/usr/local/lib/python3.12/re/init.py'> │ │
│ │ sys = <module 'sys' (built-in)> │ │
│ ╰─────────────────────────────────────────────────────────────────────╯ │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:326 in call │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:309 in call │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:348 in get_command │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:330 in get_group │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:485 in get_group_from_info │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:579 in get_command_from_info │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:555 in │
│ get_params_convertors_ctx_param_name_from_function │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/main.py:888 in get_click_param │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/typer/core.py:423 in init │
│ │
│ /home/tigran/.local/lib/python3.12/site-packages/click/core.py:2793 in init │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Secondary flag is not valid for non-boolean flag.
$ ollama --version
ollama version is 0.12.0
$ cat ~/.local/bin/open-webui
#!/usr/local/bin/python3.12
-- coding: utf-8 --
import re
import sys
from open_webui import app
if name == 'main':
sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0])
sys.exit(app())
Additional Information
No response
@tigran123 commented on GitHub (Sep 19, 2025):
Probably because some of the dependencies used by open-webui in my system are old. But this would still be a bug, since open-webui should declare the minimum version of each dependency it relies on and it would be automatically upgraded.
@Classic298 commented on GitHub (Sep 19, 2025):
It works fine for me with all the correct dependencies installed.
What if you do another pip install -r requirements.txt ?
@tigran123 commented on GitHub (Sep 19, 2025):
Wait, you are assuming that I am installing from a cloned repository, so that the file
requirements.txtis available, but I just did apip3.12 install open-webuiand this should always work.@Classic298 commented on GitHub (Sep 19, 2025):
my bad, were there any errors during the update process?
@tigran123 commented on GitHub (Sep 19, 2025):
Absolutely no errors -- I watched the process on the console and it was all fine. And it was NOT an update, it was a fresh install of version
0.6.30-- this is on a different machine, than the one running0.6.28.@tigran123 commented on GitHub (Sep 21, 2025):
Some more information on this problem: on the machine, where I had 0.6.28 installed, I now did
pip3.12 install -U open-webuiand it upgraded from 0.6.28 to 0.6.30 successfully. Moreover, Open WebUI started up just fine.I found another bug -- selecting one of the chats did NOT automatically select the corresponding model. And after selecting it manually and reloading the page the value of the selected model was lost. I will open a separate issue for this.
Anyway, looks like I have to compare the outputs of
pip3.12 liston the two machines: one where 0.6.30 works and another where it fails to start. I will let you know the difference.@tigran123 commented on GitHub (Sep 21, 2025):
Here is the patch between working and failing set of python modules:
Btw, one important thing is that on the machine, where it fails, I have a very fresh CUDA 13 Toolkit installation (with CUDA 12 Toolkit removed -- though the python supports seems to be there, according to the above list). On the machine, where it works, I have no NVIDIA GPUs whatsoever, so there is no CUDA toolkit there.
@tigran123 commented on GitHub (Sep 21, 2025):
Also, this problem is NOT specific to version 0.6.30. I have just removed it and installed version 0.6.28 explicitly via
pip3.12 install open-webui==0.6.28and it fails in exactly the same way:@tigran123 commented on GitHub (Sep 21, 2025):
Ok, I have found a workaround -- if I force the versions of
typerandclickto the known stable combination:and then re-install open-webui like this:
then
open-webui serveworks just fine. So, this had nothing to do with NVIDIA Toolkit, it was just the parsing error with Typer/Click as open-webui was building its command-line.