uriyyo / pycharm-evaluate-async-code Goto Github PK
View Code? Open in Web Editor NEWFinally, you can use await in evaluate expression 💪
Home Page: https://plugins.jetbrains.com/plugin/14476-evaluate-async-code
Finally, you can use await in evaluate expression 💪
Home Page: https://plugins.jetbrains.com/plugin/14476-evaluate-async-code
Similar to #52 (comment)
Python Version: 3.10.9
Evaluate Async Code Version: 1.22
......Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\223.8617.48.plugins\evaluate-async-code\_pydevd_async_debug.py:45: DeprecationWarning: There is no current event loop
loop = events.get_event_loop_policy().get_event_loop()
If you could point me in the right direction I might be able to implement this myself and add a PR.
Thanks in advance
When I call an awaitable in the debug console, I receive this message:
Traceback (most recent call last):
File "/Users/cleancoder/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/212.5284.18/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
exec(exp, global_vars, local_vars)
File "<input>", line 1, in <module>
File "/Users/cleancoder/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/212.5284.18/PyCharm.app.plugins/evaluate-async-code/_pydevd_async_debug.py", line 462, in async_eval
exec(code_obj, _globals, _locals)
File "<eval>", line 28, in <module>
File "/Users/cleancoder/.pyenv/versions/3.8.7/lib/python3.8/asyncio/base_events.py", line 592, in run_until_complete
self._check_running()
File "/Users/cleancoder/.pyenv/versions/3.8.7/lib/python3.8/asyncio/base_events.py", line 552, in _check_running
raise RuntimeError('This event loop is already running')
RuntimeError: This event loop is already running
Is there something I can do about it?
See this bug report aiogram/aiogram#496
After disabling your plugin, it started working fine.
I don't know whether the problem is your plugin.
I just thought that you might want to take a look.
could you please check the possibility of adding support for evaluating async js code
When start app using docker interpreter and stop in somebreakpoint there is SyntaxError "await outside function"
Code for test:
import uvicorn
from fastapi import FastAPI
app = FastAPI()
@app.get("/test2/")
async def test_async():
return {}
if __name__ == '__main__':
uvicorn.run(app, port=5000, host='0.0.0.0')
Internal error. Please refer to https://jb.gg/ide/critical-startup-errors
com.intellij.diagnostic.PluginException: com.jetbrains.python.console.PythonConsoleRunnerFactory -> com.uriyyo.evaluate_async_code.AsyncPyDebugConsoleRunnerFactory [Plugin: com.uriyyo.evaluate_async_code]
at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:567)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:328)
at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:58)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents$default(ComponentManagerImpl.kt:310)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invokeSuspend(ApplicationLoader.kt:95)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:49)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1.invokeSuspend(ApplicationLoader.kt:94)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:270)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: com.intellij.platform.instanceContainer.InstanceNotRegisteredException: com.jetbrains.python.console.PythonConsoleRunnerFactory -> com.uriyyo.evaluate_async_code.AsyncPyDebugConsoleRunnerFactory
at com.intellij.platform.instanceContainer.internal.InstanceRegistrarImpl.overrideInitializer(InstanceRegistrarImpl.kt:47)
at com.intellij.serviceContainer.ComponentManagerImpl.registerServices2Inner(ComponentManagerImpl.kt:604)
at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:560)
... 21 more
-----
Your JRE: 17.0.10+8-b1207.1 amd64 (JetBrains s.r.o.)
C:\Users\o.kulychok\AppData\Local\Programs\IntelliJ IDEA Ultimate\jbr
Basically if you try and await in a console you get SyntaxError: 'await' outside function -
I use a virtual environment - used to work beautifully before upgrading pycharm . I am also on the latest version of the plugin 1.19.
if it helps. the stacktrace looks like this:-
import asyncio
await asyncio.sleep(1)
Traceback (most recent call last):
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/code.py", line 63, in runsource
code = self.compile(source, filename, symbol)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codeop.py", line 178, in __call__
return _maybe_compile(self.compiler, source, filename, symbol)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codeop.py", line 106, in _maybe_compile
raise err1
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codeop.py", line 93, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
File "/usr/local/Cellar/[email protected]/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/codeop.py", line 143, in __call__
codeob = compile(source, filename, symbol, self.flags, True)
File "<input>", line 1
SyntaxError: 'await' outside function
Hello
The question in the title, I would really appreciate an answer
Hello,
In the plugin description, you wrote:
Finally, you can use async/await during debugging your code. Currently supports: evaluate an expression, conditional breakpoints, console window.
However, I'm trying to use your plugin in debug console but it does not work. I'm getting the errors.
Before evaluation in "Evaluate expression" window:
>>> await foo()
File "<input>", line 1
SyntaxError: 'await' outside function
After evaluation in "Evaluate expression" window:
>>> await foo()
File "<input>", line 1
__import('sys')__.__async_eval__('await foo()\n', globals(), locals())
^
SyntaxError: invalid syntax
My test code:
import asyncio
async def foo():
print('hello')
async def main():
await foo() # <-- the breakpoint is here
if __name__ == '__main__':
asyncio.run(main())
I'm using Python 3.8/3.9 and PyCharm 2020.3, Evaluate async code 1.6
from playwright.sync_api import sync_playwright
"""
The following code can run successfully, but after installing this plug-in, pycharm cannot run the following code in debug mode. Pycharm without this plug-in can run the following code successfully in debug mode
"""
playwright_context_manager = sync_playwright()
playwright = playwright_context_manager.start() # Run in debug mode, there will be an error here
browser = playwright.chromium.launch(headless=False)
context = browser.new_context(ignore_https_errors=True)
page = context.new_page()
page.goto("http://playwright.dev")
print(page.title())
browser.close()
D:\App\Minconda\envs\py38\python.exe C:\Users\**\AppData\Roaming\JetBrains\PyCharm2020.3\plugins\evaluate-async-code\_pydevd_async_debug.py "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 64914 --file D:/workspace/BaoBao/playwright_t.py
Connected to pydev debugger (build 203.7717.81)
Traceback (most recent call last):
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py", line 1477, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/workspace/BaoBao/playwright_t.py", line 4, in <module>
playwright = playwright_context_manager.start()
File "D:\App\Minconda\envs\py38\lib\site-packages\playwright\sync_api\_context_manager.py", line 75, in start
return self.__enter__()
File "D:\App\Minconda\envs\py38\lib\site-packages\playwright\sync_api\_context_manager.py", line 70, in __enter__
playwright = self._playwright
AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
Traceback (most recent call last):
File "C:\Users\hui\AppData\Roaming\JetBrains\PyCharm2020.3\plugins\evaluate-async-code\_pydevd_async_debug.py", line 458, in <module>
run_path(sys.argv.pop(1), {}, "__main__")
File "D:\App\Minconda\envs\py38\lib\runpy.py", line 265, in run_path
return _run_module_code(code, init_globals, run_name,
File "D:\App\Minconda\envs\py38\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "D:\App\Minconda\envs\py38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py", line 2167, in <module>
main()
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py", line 2158, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py", line 1470, in run
return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\pydevd.py", line 1477, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "D:\App\PyCharm 2020.3.5\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/workspace/BaoBao/playwright_t.py", line 4, in <module>
playwright = playwright_context_manager.start()
File "D:\App\Minconda\envs\py38\lib\site-packages\playwright\sync_api\_context_manager.py", line 75, in start
return self.__enter__()
File "D:\App\Minconda\envs\py38\lib\site-packages\playwright\sync_api\_context_manager.py", line 70, in __enter__
playwright = self._playwright
AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
PyCharm 2020.3.5 (Professional Edition)
Build #PY-203.7717.81, built on March 25, 2021
Expiration date: June 26, 2021
Runtime version: 11.0.10+8-b1145.96 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 980M
Cores: 16
java.lang.Throwable: No connection (command: 113 )
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:159)
at com.jetbrains.python.debugger.pydev.AbstractCommand.execute(AbstractCommand.java:159)
at com.jetbrains.python.debugger.pydev.RemoteDebugger.evaluate(RemoteDebugger.java:158)
at com.jetbrains.python.debugger.pydev.MultiProcessDebugger.evaluate(MultiProcessDebugger.java:167)
at com.jetbrains.python.debugger.PyDebugProcess.evaluate(PyDebugProcess.java:752)
at com.jetbrains.python.debugger.PyDebugProcess.evaluate(PyDebugProcess.java:748)
at com.uriyyo.evaluate_async_code.AsyncPyDebugRunner$createDebugProcess$1.evaluate(AsyncPyDebugRunner.kt:40)
at com.jetbrains.python.debugger.PyDebuggerEvaluator.lambda$doEvaluate$0(PyDebuggerEvaluator.java:59)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
I'm using pyppeteer
Hi @devova,
I saw your review of this plugin https://plugins.jetbrains.com/plugin/14476-evaluate-async-code/reviews#review=53951
Could you please share more details? Maybe I will be able to fix this issue.
C:\Windows\system32\wsl.exe --distribution Ubuntu --exec /bin/sh -c "export ENV=dev" && cd /mnt/c/Users/n2/devs/codustry/gebwai/backend/app && /mnt/c/Users/n2/devs/codustry/gebwai/backend/.venv/bin/python '/mnt/c/Program Files/JetBrains/PyCharm 2020.3.3/plugins/python/helpers/pydev/pydevd.py' '/mnt/c/Program Files/JetBrains/PyCharm 2020.3.3/plugins/python/helpers/pydev/pydevd.py' --multiproc --qt-support=auto --client 172.24.64.1 --port 54991 --file /mnt/c/Users/n2/devs/codustry/gebwai/backend/app/main.py"
Traceback (most recent call last):
File "/mnt/c/Program Files/JetBrains/PyCharm 2020.3.3/plugins/python/helpers/pydev/pydevd.py", line 1997, in main
setup = process_command_line(sys.argv)
File "/mnt/c/Program Files/JetBrains/PyCharm 2020.3.3/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_command_line_handling.py", line 146, in process_command_line
raise ValueError("Unexpected option: " + argv[i])
ValueError: Unexpected option: /mnt/c/Program Files/JetBrains/PyCharm 2020.3.3/plugins/python/helpers/pydev/pydevd.py
Usage:
pydevd.py --port N [(--client hostname) | --server] --file executable [file_options]
The plugin does not work in debug console (issue: await outside function
) automatically. To make it work one has to click "evaluate expression" and put some await ...
as the expression. After that action, the await
in the console works OK (i.e. there is no await outside function
).
Plugin version: 1.2.0
PyCharm version: 2022.2.3 (Build #PY-222.4345.23, built on October 10, 2022)
Thanks for the excellent plugin
here is my code for the test
import asyncio
async def main():
await asyncio.create_subprocess_exec('C:/Windows/System32/cmd.exe')
if __name__ == '__main__':
asyncio.run(main())
traceback :
C:\Users\X\scoop\shims\python.exe C:\Users\X\AppData\Roaming\JetBrains\PyCharm2021.3\plugins\evaluate-async-code\_pydevd_async_debug.py "C:\Program Files\JetBrains\PyCharm 2021.3\plugins\python\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 52157 --file F:/projects/nftest/b.py
Connected to pydev debugger (build 213.6777.50)
Traceback (most recent call last):
File "C:\Users\X\AppData\Roaming\JetBrains\PyCharm2021.3\plugins\evaluate-async-code\_pydevd_async_debug.py", line 38, in run
return loop.run_until_complete(task)
File "C:\Users\X\AppData\Roaming\JetBrains\PyCharm2021.3\plugins\evaluate-async-code\_pydevd_async_debug.py", line 81, in run_until_complete
return f.result()
File "C:\Users\X\scoop\apps\python39\current\lib\asyncio\futures.py", line 201, in result
raise self._exception
File "C:\Users\X\scoop\apps\python39\current\lib\asyncio\tasks.py", line 256, in __step
result = coro.send(None)
File "F:/projects/nftest/b.py", line 5, in main
await asyncio.create_subprocess_exec('C:/Windows/System32/cmd.exe')
File "C:\Users\X\scoop\apps\python39\current\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "C:\Users\X\scoop\apps\python39\current\lib\asyncio\base_events.py", line 1661, in subprocess_exec
transport = await self._make_subprocess_transport(
File "C:\Users\X\scoop\apps\python39\current\lib\asyncio\base_events.py", line 493, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
Process finished with exit code 1
workaround:
import asyncio
async def main():
await asyncio.create_subprocess_exec('C:/Windows/System32/cmd.exe')
if __name__ == '__main__':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(main())
I got an error message saying that uvloop
isn't supported, and that it only supports programs running in asyncio
. I was debugging a fastAPI service, so I believe making the plugin more extensible would be a valuable feature.
This started happening for me when running Django tests in PyCharm debugger, it crashes on various instances of sync_to_async
.
File "/Users/dev/.envs/pwn_backend_py_3_10/lib/python3.10/site-packages/asgiref/sync.py", line 220, in __call__
loop_future.result()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/dev/.envs/pwn_backend_py_3_10/lib/python3.10/site-packages/asgiref/sync.py", line 276, in _run_event_loop
asyncio.set_event_loop(self.main_event_loop)
File "/Users/dev/Library/Application Support/JetBrains/PyCharm2023.1/plugins/evaluate-async-code/_pydevd_async_debug.py", line 325, in set_loop_wrapper
_patch_loop_if_not_patched(loop)
File "/Users/dev/Library/Application Support/JetBrains/PyCharm2023.1/plugins/evaluate-async-code/_pydevd_async_debug.py", line 307, in _patch_loop_if_not_patched
_patch_loop(loop)
File "/Users/dev/Library/Application Support/JetBrains/PyCharm2023.1/plugins/evaluate-async-code/_pydevd_async_debug.py", line 175, in _patch_loop
raise ValueError('Can\'t patch loop of type %s' % type(loop))
ValueError: Can't patch loop of type <class 'NoneType'>
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)
After install this plugin (IDE was restarted) in evaluate expression still getting error: SyntaxError: 'await' outside function.
Could you explain how it should work?
RuntimeError: this event loop is already running.
I must add unit tests to cover most of the async code evaluation cases
In all my Django projects opens Python console instead of Django console, after I enable the plugin.
Pycharm 2022.1.3
Plugin version: 1.119
After disabling the plugin, everything is back to normal.
Hello, thank You for your product. It's very helpful.
Got an error on running Python Console with python3.11.1
In asyncio module, get_event_loop method, a 682 row of asyncio/events.py
File "<string>", line 339, in <module>
File "<string>", line 310, in patch_asyncio
File "<string>", line 16, in apply
File "<string>", line 45, in _get_event_loop
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 682, in get_event_loop
if not (module == 'asyncio' or module.startswith('asyncio.')):
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
As soon as I set a breakpoint and evaluate e.g. await asyncio.sleep(1)
, I get the following error log and from then on stepping does not work anymore.
Exception in callback Task.task_wakeup(<Future finished result=None>)
handle: <Handle Task.task_wakeup(<Future finished result=None>)>
Traceback (most recent call last):
File "C:\Users\Administrator\.pyenv\pyenv-win\versions\3.10.7\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-1' coro=<BrowserWorker.start_loop() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:125> wait_for=<Future finished result=None> cb=[_run_until_complete_cb() at C:\Users\Administrator\.pyenv\pyenv-win\versions\3.10.7\lib\asyncio\base_events.py:184]> while another task <Task pending name='Task-3' coro=<SolverJob.get_token() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:85>> is being executed.
Exception in callback Task.task_wakeup(<Future finished result=None>)
handle: <Handle Task.task_wakeup(<Future finished result=None>)>
Traceback (most recent call last):
File "C:\Users\Administrator\.pyenv\pyenv-win\versions\3.10.7\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-2' coro=<BrowserWorker.watch_for_completed_jobs() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:174> wait_for=<Future finished result=None>> while another task <Task pending name='Task-3' coro=<SolverJob.get_token() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:85>> is being executed.
Exception in callback Task.task_wakeup(<Future finished result=None>)
handle: <Handle Task.task_wakeup(<Future finished result=None>)>
Traceback (most recent call last):
File "C:\Users\Administrator\.pyenv\pyenv-win\versions\3.10.7\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-6' coro=<Connection.run() running at C:\Users\Administrator\PycharmProjects\project\venv\lib\site-packages\playwright\_impl\_connection.py:226> wait_for=<Future finished result=None>> while another task <Task pending name='Task-3' coro=<SolverJob.get_token() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:85>> is being executed.
attempts
Task was destroyed but it is pending!
task: <Task pending name='Task-2' coro=<BrowserWorker.watch_for_completed_jobs() running at C:\Users\Administrator\PycharmProjects\project\project\work\service.py:174> wait_for=<Future finished result=None>>
Task was destroyed but it is pending!
task: <Task pending name='Task-6' coro=<Connection.run() running at C:\Users\Administrator\PycharmProjects\project\venv\lib\site-packages\playwright\_impl\_connection.py:226> wait_for=<Future finished result=None>>
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help.
PyDev console: using IPython 8.5.0
Out[1]: 0
Hi, thanks for the plugin. Any news on 2021.3 compatibility?
First of all, I am very sorry, I am not completely sure that this bug is caused by this plug-in, first submit an issue, record the problem situation
When I was using tortoise-orm, debugging the code, I found that line breaks will affect the results of code execution, the following is a GIF recorded when the problem occurs in the project
See crash log here sometime:
java.lang.NullPointerException: super.evaluate(expression, execute, doTrunc) must not be null
at com.uriyyo.evaluate_async_code.AsyncPyDebugProcess.evaluate(AsyncPyDebugProcess.kt:33)
at com.jetbrains.python.debugger.PyDebuggerEvaluator.lambda$doEvaluate$0(PyDebuggerEvaluator.java:59)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.