来源网址 https://www.jianshu.com/p/876cf93f7bbf
https://github.com/ipython/ipython/issues/12049
解决方案是更改源文件,路径:
python:python38-32\lib\asyncio\proactor_events.py
anaconda:
windows 路径 anaconda/Lib/site-packages/asyncio/proactor_events.py
重新安装anaconda以后变成了 anaconda/Lib/asyncio/proactor_events.py
Linux 路径 anaconda3/lib/python3.8/site-packages/asyncio/proactor_events.py
添加以下代码:
766....try:
767........if f is not None:
768............f.result() # may raise
...........if self._stopping: #新加代码
...............raise exceptions.CancelledError("Event loop is stopping") # 新加代码
769........f = self._proactor.recv(self._ssock, 4096)