asyncio.run() cannot be called from a running event loop

这个问题一般在jupyter中出现
搜到的解决方法也不怎么好用

知道看到了这个评论
asyncio.run() cannot be called from a running event loop_第1张图片
很感谢

# pip install nest_asyncio首先安装此模块
import nest_asyncio#调用
nest_asyncio.apply()

成功解决
asyncio.run() cannot be called from a running event loop_第2张图片

你可能感兴趣的:(各种报错,python)