鋼砲
鋼砲

大家好我是鋼砲。

Jupyter當中遇到asyncio.run()的錯誤解決方式

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

在jupyter notebook當中遇到以下錯誤

解決方式是因為新版本的jupyter已經自動waiting了,所以不用在使用asyncio.run去呼叫

asyncio.run(main()) >> await main()

這樣就能順利執行了!


CC BY-NC-ND 2.0 版权声明

喜欢我的文章吗?
别忘了给点支持与赞赏,让我知道创作的路上有你陪伴。

加载中…

发布评论