Under windows
psycopg.InterfaceError: Psycopg cannot use the 'ProactorEventLoop' to run in async mode. Please use a compatible event loop, for instance by running 'asyncio.run(..., loop_factory=asyncio.SelectorEventLoop(selectors.SelectSelector()))'
Windows defaults to ProactorEventLoop.
ProactorEventLoop is Windows' default, but doesn't work with psycopg (async PostgreSQL driver).
SelectorEventLoop works with psycopg on Windows
Solution
Under backend/api.py
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())