ipython / ipython/ipykernel

RuntimeError: There is no current event loop in thread 'MainThread'

オープン
#929 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
734
フォーク
412
平均マージ
1日 5時間
マージ済み PR(30日)
8

説明

While trying to update ipykernel's Debian package to 6.13.0, tests were failing with the above error.

I got out of this with:
```
--- ipykernel.orig/ipykernel/inprocess/client.py
+++ ipykernel/ipykernel/inprocess/client.py
@@ -179,8 +179,7 @@
stream = kernel.shell_stream
self.session.send(stream, msg)
msg_parts = stream.recv_multipart()
- loop = asyncio.get_event_loop()
- loop.run_until_complete(kernel.dispatch_shell(msg_parts))
+ asyncio.run(kernel.dispatch_shell(msg_parts))
idents, reply_msg = self.session.recv(stream, copy=False)
self.shell_channel.call_handlers_later(reply_msg)
```

but I'm not sure it's a good solution...

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。