在 Playwright 中出现 Windows 启动崩溃以及 asyncio NotImplementedError

作者: PriyanshuAgarwal1407创建于 2026年9月3日更新于 2026年9月3日

描述错误 在 Windows 上运行 poetry 运行 uvicorn main:app --reload --port 7001 会在 Playwright 启动探测期间发生 NotImplementedError 并崩溃。这发生是因为 uvicorn --reload 在 Windows 上默认使用 SelectorEventLoop,而 SelectorEventLoop 不支持 Playwright 需要的子进程传输。

内容来源: abi/screenshot-to-code