[GH-ISSUE #23916] issue: Crashes on startup due to No module named 'aiosqlite' #35634

Closed
opened 2026-04-25 09:47:52 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @quark6789 on GitHub (Apr 21, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23916

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Other

Open WebUI Version

v0.9.0

Ollama Version (if applicable)

N/A

Operating System

macOS Tahoe 26.3.1

Browser (if applicable)

N/A

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

open-webui launches.

Actual Behavior

open-webui crashes during startup with ModuleNotFoundError: No module named 'aiosqlite'. (See logs for the traceback.)

Steps to Reproduce

  1. Start with open-webui v0.8.12. It was working at this point. (This step probably isn't necessary but I'm documenting it anyway.) The Python version is 3.13.11. I do not know exactly what the versions were of all the dependencies since open-webui does not pin them.
  2. Upgrade to open-webui v0.9.0 using uv tool upgrade --all. (See attached logs for exact versions of all dependencies used.) This was run at 2:09 AM Pacific Daylight Time, UTC-7.
  3. Run open-webui serve. (I tested removing the environment variables and flags shown in the logs, but the error is the exact same.)

Logs & Screenshots

Here are my terminal logs when I updated open-webui using uv and attempted to launch it. Because it crashed during launch, browser console logs are not applicable. I am not using Docker.

$ uv tool upgrade --all                                                                       
Updated open-webui v0.8.12 -> v0.9.0
 - aiohttp==3.13.2
 + aiohttp==3.13.5
 - authlib==1.6.9
 + authlib==1.6.10
 - av==17.0.0
 + av==17.0.1
 - black==26.1.0
 + black==26.3.1
 - botocore==1.42.89
 + botocore==1.42.92
 - filelock==3.28.0
 + filelock==3.29.0
 - huggingface-hub==1.10.2
 + huggingface-hub==1.11.0
 - langchain-core==1.2.29
 + langchain-core==1.3.0
 - langgraph-checkpoint==4.0.1
 + langgraph-checkpoint==4.0.2
 - langgraph-prebuilt==1.0.9
 + langgraph-prebuilt==1.0.10
 - langsmith==0.7.31
 + langsmith==0.7.33
 - lxml==6.0.4
 + lxml==6.1.0
 - open-webui==0.8.12
 + open-webui==0.9.0
 - pydantic-settings==2.13.1
 + pydantic-settings==2.14.0
 - requests==2.32.5
 + requests==2.33.1
 - sentence-transformers==5.2.3
 + sentence-transformers==5.4.0
 - transformers==5.3.0
 + transformers==5.5.4
Installed 1 executable: open-webui

$ BYPASS_MODEL_ACCESS_CONTROL=true open-webui serve --port 58581                              
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Loading WEBUI_SECRET_KEY from /Users/orbit/.webui_secret_key
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/__init__.py:68 in serve        │
│                                                                                                                      │
│   65 │   │   │   os.environ['USE_CUDA_DOCKER'] = 'false'                                                             │
│   66 │   │   │   os.environ['LD_LIBRARY_PATH'] = ':'.join(LD_LIBRARY_PATH)                                           │
│   67 │                                                                                                               │
│ ❱ 68 │   import open_webui.main  # noqa: F401                                                                        │
│   69 │   from open_webui.env import UVICORN_WORKERS  # Import the workers setting                                    │
│   70 │                                                                                                               │
│   71 │   uvicorn.run(                                                                                                │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/main.py:60 in <module>         │
│                                                                                                                      │
│     57 from starsessions.stores.redis import RedisStore                                                              │
│     58                                                                                                               │
│     59 from open_webui.utils import logger                                                                           │
│ ❱   60 from open_webui.utils.asgi_middleware import (                                                                │
│     61 │   AuthTokenMiddleware,                                                                                      │
│     62 │   CommitSessionMiddleware,                                                                                  │
│     63 │   RedirectMiddleware,                                                                                       │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/utils/asgi_middleware.py:44 in │
│ <module>                                                                                                             │
│                                                                                                                      │
│    41 from starlette.requests import Request                                                                         │
│    42 from starlette.types import ASGIApp, Message, Receive, Scope, Send                                             │
│    43                                                                                                                │
│ ❱  44 from open_webui.internal.db import ScopedSession                                                               │
│    45 from open_webui.utils.auth import get_http_authorization_cred                                                  │
│    46                                                                                                                │
│    47 log = logging.getLogger(__name__)                                                                              │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/internal/db.py:340 in <module> │
│                                                                                                                      │
│   337 if 'sqlite' in ASYNC_SQLALCHEMY_DATABASE_URL:                                                                  │
│   338 │   # Generous default — async coroutines + no session sharing = high connection demand.                       │
│   339 │   _sqlite_pool_size = DATABASE_POOL_SIZE if isinstance(DATABASE_POOL_SIZE, int) and DA                       │
│ ❱ 340 │   async_engine = create_async_engine(                                                                        │
│   341 │   │   ASYNC_SQLALCHEMY_DATABASE_URL,                                                                         │
│   342 │   │   connect_args={'check_same_thread': False},                                                             │
│   343 │   │   pool_size=_sqlite_pool_size,                                                                           │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/ext/asyncio/engine.py:120 in   │
│ create_async_engine                                                                                                  │
│                                                                                                                      │
│    117 │   │   │   )                                                                                                 │
│    118 │   │                                                                                                         │
│    119 │   │   kw["creator"] = creator                                                                               │
│ ❱  120 │   sync_engine = _create_engine(url, **kw)                                                                   │
│    121 │   return AsyncEngine(sync_engine)                                                                           │
│    122                                                                                                               │
│    123                                                                                                               │
│ in create_engine:2                                                                                                   │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/util/deprecations.py:281 in    │
│ warned                                                                                                               │
│                                                                                                                      │
│   278 │   │   │   │   │   │   version_warnings[m],                                                                   │
│   279 │   │   │   │   │   │   stacklevel=3,                                                                          │
│   280 │   │   │   │   │   )                                                                                          │
│ ❱ 281 │   │   │   return fn(*args, **kwargs)  # type: ignore[no-any-return]                                          │
│   282 │   │                                                                                                          │
│   283 │   │   doc = fn.__doc__ is not None and fn.__doc__ or ""                                                      │
│   284 │   │   if doc:                                                                                                │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/engine/create.py:617 in        │
│ create_engine                                                                                                        │
│                                                                                                                      │
│   614 │   │   for k in util.get_func_kwargs(dbapi_meth):                                                             │
│   615 │   │   │   if k in kwargs:                                                                                    │
│   616 │   │   │   │   dbapi_args[k] = pop_kwarg(k)                                                                   │
│ ❱ 617 │   │   dbapi = dbapi_meth(**dbapi_args)                                                                       │
│   618 │                                                                                                              │
│   619 │   dialect_args["dbapi"] = dbapi                                                                              │
│   620                                                                                                                │
│                                                                                                                      │
│ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py:4 │
│ 49 in import_dbapi                                                                                                   │
│                                                                                                                      │
│   446 │   @classmethod                                                                                               │
│   447 │   def import_dbapi(cls) -> AsyncAdapt_aiosqlite_dbapi:                                                       │
│   448 │   │   return AsyncAdapt_aiosqlite_dbapi(                                                                     │
│ ❱ 449 │   │   │   __import__("aiosqlite"), __import__("sqlite3")                                                     │
│   450 │   │   )                                                                                                      │
│   451 │                                                                                                              │
│   452 │   @classmethod                                                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ModuleNotFoundError: No module named 'aiosqlite'

Exit code 1

Additional Information

No response

Originally created by @quark6789 on GitHub (Apr 21, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/23916 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Other ### Open WebUI Version v0.9.0 ### Ollama Version (if applicable) N/A ### Operating System macOS Tahoe 26.3.1 ### Browser (if applicable) N/A ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior open-webui launches. ### Actual Behavior open-webui crashes during startup with `ModuleNotFoundError: No module named 'aiosqlite'`. (See logs for the traceback.) ### Steps to Reproduce 1. Start with open-webui v0.8.12. It was working at this point. (This step probably isn't necessary but I'm documenting it anyway.) The Python version is 3.13.11. I do not know exactly what the versions were of all the dependencies since open-webui does not pin them. 2. Upgrade to open-webui v0.9.0 using `uv tool upgrade --all`. (See attached logs for exact versions of all dependencies used.) This was run at 2:09 AM Pacific Daylight Time, UTC-7. 3. Run `open-webui serve`. (I tested removing the environment variables and flags shown in the logs, but the error is the exact same.) ### Logs & Screenshots Here are my terminal logs when I updated open-webui using `uv` and attempted to launch it. Because it crashed during launch, browser console logs are not applicable. I am not using Docker. ``` $ uv tool upgrade --all Updated open-webui v0.8.12 -> v0.9.0 - aiohttp==3.13.2 + aiohttp==3.13.5 - authlib==1.6.9 + authlib==1.6.10 - av==17.0.0 + av==17.0.1 - black==26.1.0 + black==26.3.1 - botocore==1.42.89 + botocore==1.42.92 - filelock==3.28.0 + filelock==3.29.0 - huggingface-hub==1.10.2 + huggingface-hub==1.11.0 - langchain-core==1.2.29 + langchain-core==1.3.0 - langgraph-checkpoint==4.0.1 + langgraph-checkpoint==4.0.2 - langgraph-prebuilt==1.0.9 + langgraph-prebuilt==1.0.10 - langsmith==0.7.31 + langsmith==0.7.33 - lxml==6.0.4 + lxml==6.1.0 - open-webui==0.8.12 + open-webui==0.9.0 - pydantic-settings==2.13.1 + pydantic-settings==2.14.0 - requests==2.32.5 + requests==2.33.1 - sentence-transformers==5.2.3 + sentence-transformers==5.4.0 - transformers==5.3.0 + transformers==5.5.4 Installed 1 executable: open-webui $ BYPASS_MODEL_ACCESS_CONTROL=true open-webui serve --port 58581 Loading WEBUI_SECRET_KEY from file, not provided as an environment variable. Loading WEBUI_SECRET_KEY from /Users/orbit/.webui_secret_key ╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/__init__.py:68 in serve │ │ │ │ 65 │ │ │ os.environ['USE_CUDA_DOCKER'] = 'false' │ │ 66 │ │ │ os.environ['LD_LIBRARY_PATH'] = ':'.join(LD_LIBRARY_PATH) │ │ 67 │ │ │ ❱ 68 │ import open_webui.main # noqa: F401 │ │ 69 │ from open_webui.env import UVICORN_WORKERS # Import the workers setting │ │ 70 │ │ │ 71 │ uvicorn.run( │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/main.py:60 in <module> │ │ │ │ 57 from starsessions.stores.redis import RedisStore │ │ 58 │ │ 59 from open_webui.utils import logger │ │ ❱ 60 from open_webui.utils.asgi_middleware import ( │ │ 61 │ AuthTokenMiddleware, │ │ 62 │ CommitSessionMiddleware, │ │ 63 │ RedirectMiddleware, │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/utils/asgi_middleware.py:44 in │ │ <module> │ │ │ │ 41 from starlette.requests import Request │ │ 42 from starlette.types import ASGIApp, Message, Receive, Scope, Send │ │ 43 │ │ ❱ 44 from open_webui.internal.db import ScopedSession │ │ 45 from open_webui.utils.auth import get_http_authorization_cred │ │ 46 │ │ 47 log = logging.getLogger(__name__) │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/open_webui/internal/db.py:340 in <module> │ │ │ │ 337 if 'sqlite' in ASYNC_SQLALCHEMY_DATABASE_URL: │ │ 338 │ # Generous default — async coroutines + no session sharing = high connection demand. │ │ 339 │ _sqlite_pool_size = DATABASE_POOL_SIZE if isinstance(DATABASE_POOL_SIZE, int) and DA │ │ ❱ 340 │ async_engine = create_async_engine( │ │ 341 │ │ ASYNC_SQLALCHEMY_DATABASE_URL, │ │ 342 │ │ connect_args={'check_same_thread': False}, │ │ 343 │ │ pool_size=_sqlite_pool_size, │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/ext/asyncio/engine.py:120 in │ │ create_async_engine │ │ │ │ 117 │ │ │ ) │ │ 118 │ │ │ │ 119 │ │ kw["creator"] = creator │ │ ❱ 120 │ sync_engine = _create_engine(url, **kw) │ │ 121 │ return AsyncEngine(sync_engine) │ │ 122 │ │ 123 │ │ in create_engine:2 │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/util/deprecations.py:281 in │ │ warned │ │ │ │ 278 │ │ │ │ │ │ version_warnings[m], │ │ 279 │ │ │ │ │ │ stacklevel=3, │ │ 280 │ │ │ │ │ ) │ │ ❱ 281 │ │ │ return fn(*args, **kwargs) # type: ignore[no-any-return] │ │ 282 │ │ │ │ 283 │ │ doc = fn.__doc__ is not None and fn.__doc__ or "" │ │ 284 │ │ if doc: │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/engine/create.py:617 in │ │ create_engine │ │ │ │ 614 │ │ for k in util.get_func_kwargs(dbapi_meth): │ │ 615 │ │ │ if k in kwargs: │ │ 616 │ │ │ │ dbapi_args[k] = pop_kwarg(k) │ │ ❱ 617 │ │ dbapi = dbapi_meth(**dbapi_args) │ │ 618 │ │ │ 619 │ dialect_args["dbapi"] = dbapi │ │ 620 │ │ │ │ /Users/orbit/.local/share/uv/tools/open-webui/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py:4 │ │ 49 in import_dbapi │ │ │ │ 446 │ @classmethod │ │ 447 │ def import_dbapi(cls) -> AsyncAdapt_aiosqlite_dbapi: │ │ 448 │ │ return AsyncAdapt_aiosqlite_dbapi( │ │ ❱ 449 │ │ │ __import__("aiosqlite"), __import__("sqlite3") │ │ 450 │ │ ) │ │ 451 │ │ │ 452 │ @classmethod │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ModuleNotFoundError: No module named 'aiosqlite' ``` Exit code 1 ### Additional Information _No response_
GiteaMirror added the bug label 2026-04-25 09:47:52 -05:00
Author
Owner

@educhet-inovertis commented on GitHub (Apr 21, 2026):

Can confirm this issue, for now to fix open the venv and simply install the module manualy:
source venv/bin/activate
pip install aiosqlite
then restart the process

<!-- gh-comment-id:4287753205 --> @educhet-inovertis commented on GitHub (Apr 21, 2026): Can confirm this issue, for now to fix open the venv and simply install the module manualy: `source venv/bin/activate` `pip install aiosqlite` then restart the process
Author
Owner

@Classic298 commented on GitHub (Apr 21, 2026):

Cannot reproduce, how can i reproduce? The reproduction steps are a bit ambiguous

<!-- gh-comment-id:4287805013 --> @Classic298 commented on GitHub (Apr 21, 2026): Cannot reproduce, how can i reproduce? The reproduction steps are a bit ambiguous
Author
Owner

@educhet-inovertis commented on GitHub (Apr 21, 2026):

Cannot reproduce, how can i reproduce? The reproduction steps are a bit ambiguous

simply upgrading using
pip install --upgrade open-webui
from v0.8.12 to v0.9.0, then start the process

<!-- gh-comment-id:4287826205 --> @educhet-inovertis commented on GitHub (Apr 21, 2026): > Cannot reproduce, how can i reproduce? The reproduction steps are a bit ambiguous simply upgrading using `pip install --upgrade open-webui` from v0.8.12 to v0.9.0, then start the process
Author
Owner

@Classic298 commented on GitHub (Apr 21, 2026):

Ok. Did on my windows system and it worked

<!-- gh-comment-id:4287831016 --> @Classic298 commented on GitHub (Apr 21, 2026): Ok. Did on my windows system and it worked
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35634