mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-25 17:21:00 -05:00
[GH-ISSUE #24152] issue: v0.9.2 fails to start on Windows venv with PostgreSQL: Psycopg cannot use ProactorEventLoop #58877
Reference in New Issue
Block a user
Originally created by @Rooster-Fighter on GitHub (Apr 26, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24152
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
v0.9.2
Ollama Version (if applicable)
0.21.2
Operating System
Windows 11 Home 26200.8246 ja-JP
Browser (if applicable)
Firefox 150.0
Confirmation
README.md.Expected Behavior
Open Web UI won't startup after update v 0.9.2
Actual Behavior
Windows: Psycopg cannot use the 'ProactorEventLoop' to run in async mode.
Steps to Reproduce
Create a virtual environment and install latest Open WebUI via pip:
pip install open-webui
and setting postgress DB configuration.
after that.
simply on venv
put "open-webui serve"
Logs & Screenshots
(openwebui) F:\gpt\openwebui>open-webui serve
Active code page: 65001
Loading WEBUI_SECRET_KEY from file, not provided as an environment variable.
Loading WEBUI_SECRET_KEY from F:\gpt\openwebui.webui_secret_key
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
WARNI [open_webui.env] ⚠️ SECURITY WARNING: JWT_EXPIRES_IN is set to '-1'
See: https://docs.openwebui.com/reference/env-configuration
WARNI [open_webui.env]
WARNING: CORS_ALLOW_ORIGIN IS SET TO '*' - NOT RECOMMENDED FOR PRODUCTION DEPLOYMENTS.
WARNI [langchain_community.utils.user_agent] USER_AGENT environment variable not set, consider setting it to identify your requests.
██████╗ ██████╗ ███████╗███╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██╗██╗
██╔═══██╗██╔══██╗██╔════╝████╗ ██║ ██║ ██║██╔════╝██╔══██╗██║ ██║██║
██║ ██║██████╔╝█████╗ ██╔██╗ ██║ ██║ █╗ ██║█████╗ ██████╔╝██║ ██║██║
██║ ██║██╔═══╝ ██╔══╝ ██║╚██╗██║ ██║███╗██║██╔══╝ ██╔══██╗██║ ██║██║
╚█████���╔╝██║ ███████╗██║ ╚████║ ╚███╔███╔╝███████╗██████╔╝╚██████╔╝██║
╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═══╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝
v0.9.2 - building the best AI user interface.
https://github.com/open-webui/open-webui
Fetching 30 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:00<00:00, 12970.74it/s]
Download complete: : 0.00B [00:00, ?B/s] | 0/30 [00:00<?, ?it/s]
Loading weights: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 103/103 [00:00<00:00, 7515.10it/s]
BertModel LOAD REPORT from: C:\Users\XXXX.cache\huggingface\hub\models--sentence-transformers--all-MiniLM-L6-v2\snapshots\c9745ed1d9f207416be6d2e6f8de32d1f16199bf
Key | Status | Details
------------------------+------------+--------
embeddings.position_ids | UNEXPECTED |
Notes:
INFO: Started server process [22712]
INFO: Waiting for application startup.
2026-04-26 16:49:54.739 | INFO | open_webui.utils.logger:start_logger:194 - GLOBAL_LOG_LEVEL: INFO
2026-04-26 16:49:54.739 | INFO | open_webui.main:lifespan:659 - Installing external dependencies of functions and tools...
Traceback (most recent call last):
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 143, in init
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 3317, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 448, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 1272, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 712, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\impl.py", line 177, in _do_get
with util.safe_reraise():
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in exit
raise exc_value.with_traceback(exc_tb)
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\impl.py", line 175, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 389, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 674, in init
self.__connect()
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 900, in __connect
with util.safe_reraise():
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in exit
raise exc_value.with_traceback(exc_tb)
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\create.py", line 667, in connect
return dialect.connect(*cargs_tup, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\default.py", line 630, in connect
return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\dialects\postgresql\psycopg.py", line 812, in connect
await_only(creator_fn(*arg, **kw))
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 132, in await_only
return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 196, in greenlet_spawn
value = await result
^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\psycopg\connection_async.py", line 104, in connect
raise e.InterfaceError(
psycopg.InterfaceError: Psycopg cannot use the 'ProactorEventLoop' to run in async mode. Please use a compatible event loop, for instance by setting 'asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "F:\gpt\openwebui\Lib\site-packages\starlette\routing.py", line 694, in lifespan
async with self.lifespan_context(app) as maybe_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\fastapi\routing.py", line 212, in merged_lifespan
async with original_context(app) as maybe_original_state:
File "C:\Users\silen\AppData\Local\Programs\Python\Python311\Lib\contextlib.py", line 210, in aenter
return await anext(self.gen)
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\open_webui\main.py", line 660, in lifespan
await install_tool_and_function_dependencies()
File "F:\gpt\openwebui\Lib\site-packages\open_webui\utils\plugin.py", line 418, in install_tool_and_function_dependencies
function_list = await Functions.get_functions(active_only=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\open_webui\models\functions.py", line 225, in get_functions
result = await db.execute(select(Function).filter_by(is_active=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\ext\asyncio\session.py", line 449, in execute
result = await greenlet_spawn(
^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 201, in greenlet_spawn
result = context.throw(*sys.exc_info())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\orm\session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\orm\session.py", line 2239, in _execute_internal
conn = self._connection_for_bind(bind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\orm\session.py", line 2108, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 2, in _connection_for_bind
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\orm\state_changes.py", line 137, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\orm\session.py", line 1187, in _connection_for_bind
conn = bind.connect()
^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 3293, in connect
return self._connection_cls(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 145, in init
Connection._handle_dbapi_exception_noconnection(
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 2448, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 143, in init
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\base.py", line 3317, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 448, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 1272, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 712, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\impl.py", line 177, in _do_get
with util.safe_reraise():
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in exit
raise exc_value.with_traceback(exc_tb)
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\impl.py", line 175, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 389, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 674, in init
self.__connect()
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 900, in __connect
with util.safe_reraise():
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util\langhelpers.py", line 121, in exit
raise exc_value.with_traceback(exc_tb)
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\pool\base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\create.py", line 667, in connect
return dialect.connect(*cargs_tup, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\engine\default.py", line 630, in connect
return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\dialects\postgresql\psycopg.py", line 812, in connect
await_only(creator_fn(*arg, **kw))
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 132, in await_only
return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\sqlalchemy\util_concurrency_py3k.py", line 196, in greenlet_spawn
value = await result
^^^^^^^^^^^^
File "F:\gpt\openwebui\Lib\site-packages\psycopg\connection_async.py", line 104, in connect
raise e.InterfaceError(
sqlalchemy.exc.InterfaceError: (psycopg.InterfaceError) Psycopg cannot use the 'ProactorEventLoop' to run in async mode. Please use a compatible event loop, for instance by setting 'asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())'
(Background on this error at: https://sqlalche.me/e/20/rvf5)
Application startup failed. Exiting.
(openwebui) F:\gpt\openwebui>
Additional Information
I rolled back to v0.9.1 and it is working again.
This issue does not occur on v0.9.1 under the same environment and database configuration.
I also checked the release notes and noticed the database driver change:
Changed
⚙️ psycopg v3 async driver. The async database driver has been migrated from asyncpg to psycopg (v3). This is a transparent change for most deployments, but custom connection strings with asyncpg-specific parameters may need adjustment.
@rgaricano commented on GitHub (Apr 26, 2026):
are you tried with
pip install open-webui[postgres]orpip install open-webui[all]?(for install it with pycopg & pgvector libs)
I see that that libs isn't updated to use psycopg v3:
https://github.com/open-webui/open-webui/blob/8dae237a0bfdac4b7f55b463b3e2769ea4b94a0b/pyproject.toml#L139-L152
psycopg2-binaryshould be updated to:psycopg[binary]==3.3.3@Rooster-Fighter commented on GitHub (Apr 26, 2026):
Thank you for response.
Up to v0.9.1, I had been using:
pip install open-webui
For this issue, it first appeared after upgrading with:
pip install -U open-webui
As you suggested, I also tested with:
pip install -U "open-webui[postgres]"
The result was the same error. I am attaching the log output.
log260426.txt
So the issue still occurs even with the PostgreSQL extras installed.
@Rooster-Fighter commented on GitHub (Apr 26, 2026):
@rgaricano
I tried install psycopg[binary]==3.3.3
but same result. attech log.
log260426_2.txt
@rgaricano commented on GitHub (Apr 27, 2026):
It seem that it's an issue of psycopg & windows: https://www.psycopg.org/psycopg3/docs/advanced/async.html#async
Workaround:
https://github.com/psycopg/psycopg/discussions/233#discussioncomment-2234054
@taka817123 commented on GitHub (Apr 28, 2026):
FYI: the WindowsSelectorEventLoopPolicy workaround alone doesn't fix this when running under uvicorn. uvicorn on Windows ignores the loop policy and instantiates ProactorEventLoop directly via its hardcoded factory (uvicorn/loops/asyncio.py), so psycopg async still fails.
I also needed to monkey-patch uvicorn's loop factory before uvicorn.run() — e.g. in backend/open_webui/__init__.py:
With this, Open WebUI v0.9.2 starts cleanly on Windows11 with postgresql+psycopg://. Also, pyproject.toml should bump psycopg2-binary → psycopg[binary]>=3.3 for the [postgres]/[all] extras.> import asyncio, sys