LoginSignup
2
0

More than 1 year has passed since last update.

【Python】パーフェクトPythonの12章・asyncio項目でエラーが警告への対処法

Last updated at Posted at 2022-03-11

パーフェクトPythonの12章・asyncioの項目でエラーが警告が発生

基本情報

環境 : Python3.10
PC : MacBook Pro
Editor : Visual Studio Code

警告内容

DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()

Python3.10では、get_event_loop()を呼ぶと警告を発生する模様。
get_event_loop()ではなく、get_running_loopが推奨されている。

【参照】

パーフェクトPythonは、Python Version3.8ベースで書かれているので、少しばかり相違点があり、意外なエラーが出るので、注意が必要ですね。

2
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0