uriyyo / pycharm-evaluate-async-code

Finally, you can use await in evaluate expression 💪
https://plugins.jetbrains.com/plugin/14476-evaluate-async-code
44 stars 2 forks source link

DeprecationWarning: There is no current event loop #52

Closed gygabyte017 closed 2 years ago

gygabyte017 commented 2 years ago

I'm getting this warning with Python 3.10 (didn't happen with Python 3.9):

C:\Users\xxx\AppData\Roaming\JetBrains\PyCharm2022.1\plugins\evaluate-async-code\_pydevd_async_debug.py C:\Users\xxx\software\JetBrains\PyCharm\plugins\python\helpers\pydev\pydevd.py --module --multiprocess --qt-support=auto --client 127.0.0.1 --port 51025 --file uvicorn main:app --port 19002 --log-level debug
C:\Users\xxx\AppData\Roaming\JetBrains\PyCharm2022.1\plugins\evaluate-async-code\_pydevd_async_debug.py:243: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
C:\Users\xxx\AppData\Roaming\JetBrains\PyCharm2022.1\plugins\evaluate-async-code\_pydevd_async_debug.py:12: DeprecationWarning: There is no current event loop
  loop = loop or asyncio.get_event_loop()
Connected to pydev debugger (build 221.5787.24)
C:\Users\xxx\AppData\Roaming\JetBrains\PyCharm2022.1\plugins\evaluate-async-code\_pydevd_async_debug.py:36: DeprecationWarning: There is no current event loop
  task = asyncio.ensure_future(main)
uriyyo commented 2 years ago

Fixed in: https://github.com/uriyyo/pycharm-evaluate-async-code/commit/a2d315995312e01fffb1a26c3cdfb6243862acd7 https://github.com/uriyyo/pycharm-evaluate-async-code/commit/a4d9db75211e720faa8b6d1cb4c5832368b16e2d

uriyyo commented 2 years ago

Hi @gygabyte017,

This issue should be fixed in version 1.20. Please, reopen this issue in the case when issue is still present.

moomoohk commented 2 years ago

Hi Yurii, Where can we get 1.20? Latest on the Jetbrains Marketplace is 1.19...

uriyyo commented 2 years ago

Hi @moomoohk,

Could you please try to update PyCharm to the latest version?

Link to 1.20 version - https://plugins.jetbrains.com/plugin/14476-evaluate-async-code/versions/stable/206555

moomoohk commented 2 years ago

Thanks, that did the trick!