質問するログイン新規登録

回答編集履歴

1

asyncio のloop の設定方法について、コードが誤っていたので訂正します get_event_loop -> new_event_loop

2020/05/14 14:59

投稿

teamikl
teamikl

スコア8824

answer CHANGED
@@ -4,7 +4,7 @@
4
4
  import asyncio
5
5
 
6
6
  def rp():
7
- RPC = Presence(client_id, pipe=0, loop=asyncio.get_event_loop())
7
+ RPC = Presence(client_id, pipe=0, loop=asyncio.new_event_loop())
8
8
  ```
9
9
 
10
10
  asynciomainスレッド以外で使う場合は、明示的にイベントループを指定する必要があり、