You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows下IPython/Jupyter触发_overlapped.Overlapped运行时错误如何解决

Windows环境IPython/Jupyter连续按回车触发asyncio RuntimeError问题

复现说明

该RuntimeError无需执行自定义代码即可复现:仅启动IPython进入交互提示符后,连续多次按回车键就会抛出对应错误。
提前添加的asyncio事件循环适配代码如下:

import platform, asyncio
if platform.system() == 'Windows':
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

复现步骤

  • 执行命令ipython -i --no-banner enumerate_vs_range.py启动IPython
  • 启动后不输入任何执行代码,仅连续按2-3次回车
  • 终端抛出如下报错:
(base) C:\Users\03987N744\Training_notebook>ipython -i --no-banner enumerate_vs_range.py

In [1]:

In [1]:

In [1]:

Traceback (most recent call last):
  File "C:\Users\Anaconda3\lib\asyncio\windows_events.py", line 439, in select
    self._poll(timeout)
RuntimeError: <_overlapped.Overlapped object at 0x0000022127E19DB0> still has pending operation at deallocation, the process may crash

问题特征

  • 该异常仅在IPython、Jupyter Notebook环境下出现
  • 原生标准Python环境不会触发该问题

内容的提问来源于stack exchange,提问作者Anicaprio

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.31 13:15:47