mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[GH-ISSUE #4964] issue: pip install 0.3.16 #133531
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 @gsm1258 on GitHub (Aug 28, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/4964
Bug Report
Running migrations
Error: Can't load plugin: sqlalchemy.dialects:driver
OperationalError: (sqlite3.OperationalError) no such table: config [SQL: SELECT config.id AS config_id, config.data AS config_data, config.version AS config_version, config.created_at AS config_created_at, config.updated_at AS config_updated_at FROM config ORDER BY config.id DESC LIMIT ? OFFSET ?]
[parameters: (1, 0)]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
Installation Method
pip install open-webui
Environment
Open WebUI Version: v0.3.16
Ollama (if applicable): v0.3.8
Operating System: Windows 11
Browser (if applicable): Edge 128.0
@GitLeandroHub commented on GitHub (Aug 29, 2024):
Me also @gsm1258 , exacly same Error. (Windows 10 - Local Machine)
@drupol commented on GitHub (Aug 29, 2024):
Same issue on NixOS after upgrading to 0.3.16.
@Edofin commented on GitHub (Aug 29, 2024):
Same issue Windows 11.
@rofoto commented on GitHub (Aug 30, 2024):
same error
@vikrantrathore commented on GitHub (Aug 30, 2024):
This issue can be fixed by running the alembic migration in the backend. You can do it in following way:
First try create an alembic.ini in the root of open-webui project you have setup, e.g. if you used .venv directory for python virtual environment in your project root the things would look like this.
Create a file named alembic.ini and change the path of migrations an example file is at the end of the comment. If you used python 3.11 or python 3.12 change it accordingly.
After you have created the file follow the following commands:
Once you see this response the config table is created. Now you can go back to your open_webui project folder and start it and the data will automatically moved from config.json to config table in your database.
Now you can use your upgraded open-webui which will be version 0.3.16.
One way to fix this is to run alembic upgrade command on the start of the open-webui server.
@hronoas commented on GitHub (Aug 30, 2024):
@vikrantrathore
Thx.
One thing:
alembic -c alembic.ini upgrade headworking only fromvenv\Lib\site-packagespath as CWD@vikrantrathore commented on GitHub (Aug 30, 2024):
Since the alembic package is installed as python dependency its available in project_root, once the virtual environment is activated. So you don't have to CWD to site-packages if your DATA_DIR is not in that directory. My instructions were only for linux so I wrote
. .venv/bin/activate, this needs to be modified if you are using windows without linux subsystem you need to probably call.venv\bin\activate.batAlso I just changed the path of migrations in alembic.ini, since I do not keep DATA_DIR inside site-packages but inside the project_root folder where I installed open-webui.
Actually now a days I use uv for open-webui so my commands are just
DATA_DIR=<your_data_directory_path> uv run python -m alembic -c alembic.ini upgrade head, same can be done if you are using poetry or rye.@M4g3dd0 commented on GitHub (Aug 30, 2024):
I'm using pyenv, in my case I had to find alembic.ini and run open-webui serve in the same directory.
find .pyenv/ -name alembic.ini.pyenv/versions/openwebui/lib/python3.11/site-packages/alembic.inicd .pyenv/versions/openwebui/lib/python3.11/site-packages/open-webui serveUpgrade process is initiated right on start, config table gets created, and data from config.json, where settings from connection menu are stored, is transferred into the table.
@vikrantrathore commented on GitHub (Aug 30, 2024):
That should work as well given alembic.ini has directory called migrations
where it will look for migration file and its inside the site-packages.
This can be in virtual environment or in system python or pyenv. DATA_DIR
is only necessary when using Sqlite for database, if using postgresql or
another sqlalchemy databae with URL set in environment variable. This
information is picked up from env.py.
On Fri, 30 Aug 2024 at 4:26 PM, M4g3dd0 @.***> wrote:
@gsm1258 commented on GitHub (Aug 31, 2024):
New issue:
conda activate d:\webui-3.16
cd D:\webui-3.16\Lib\site-packages
open-webui serve
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Generating a new secret key and saving it to D:\webui-3.16\Lib\site-packages.webui_secret_key
Loading WEBUI_SECRET_KEY from D:\webui-3.16\Lib\site-packages.webui_secret_key
d:\webui-3.16\Lib
Running migrations
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 7e5b5dc7342b, init
INFO [alembic.runtime.migration] Running upgrade 7e5b5dc7342b -> ca81bd47c050, Add config table
INFO [env] 'DEFAULT_LOCALE' loaded from the latest database entry
INFO [env] 'DEFAULT_PROMPT_SUGGESTIONS' loaded from the latest database entry
WARNI [env]
WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
INFO [env] Embedding model set: sentence-transformers/all-MiniLM-L6-v2
INFO [apps.audio.main] whisper_device_type: cpu
WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
OSError: [WinError 126] The specified module could not be found. Error loading "D:\webui-3.16\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.
@ANK789 commented on GitHub (Aug 31, 2024):
pip install open-webui==0.3.15 ,will ok.
@shadowfaxproject commented on GitHub (Aug 31, 2024):
I am facing the exact same problem on M3-mac and this workaround works for now. Will be good to get a permanent solution.
@M4g3dd0 commented on GitHub (Aug 31, 2024):
I'm not running Open-WebUI on Windows, so I can not check this myself. I think that you have just to add the dll file to the required folder.
The following link has a solution to similar problem.
https://github.com/Acly/krita-ai-diffusion/issues/965#issuecomment-2254244554
@sjswerdloff commented on GitHub (Sep 1, 2024):
Very helpful!
Once in the proper site-packages I had to activate my virtualenv (py311_llm):
pyenv activate py311_llm
and then it worked.
@cantalupo555 commented on GitHub (Sep 3, 2024):
I have the same problem on Ubuntu LTS.
open-webui serve@tjbck commented on GitHub (Sep 4, 2024):
Should be fixed with 0.3.17, let me know if the issue persists!
@shadowfaxproject commented on GitHub (Sep 4, 2024):
Tried it with 0.3.18. It works as expected now.
@ftgreat commented on GitHub (Sep 27, 2024):
@gsm1258 麻烦您关注下这个issue,谢谢
https://github.com/gsm1258/1383298/issues/1