aerich icon indicating copy to clipboard operation
aerich copied to clipboard

fix: update asyncio event loop policy on Windows

Open radluz opened this issue 3 years ago • 0 comments

Fix for Windows incompatibility

On Windows, Psycopg is not compatible with the default ProactorEventLoop. Please use a different loop, for instance the SelectorEventLoop.

For instance, you can use, early in your program:

asyncio.set_event_loop_policy(
    asyncio.WindowsSelectorEventLoopPolicy()
)

Source: https://www.psycopg.org/psycopg3/docs/advanced/async.html

radluz avatar Jul 24 '22 21:07 radluz