pycharm-evaluate-async-code
pycharm-evaluate-async-code copied to clipboard
Great plugin , but doesn't work anymore in pycharm 2021.3.1
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
Thanks, I will take close look.
Any news on that?
Hi @chrismaille,
Will try to fix this one.
Hi @uriyyo, did you manage to take a look and see if that can be fixed?
Hi @krmozejko,
Unfortunately, there are changes inside PyCharm API. I am trying to figure out how can I fix it.
Hi @pfrantz, @chrismaille, @krmozejko
This issue should be fixed in version 1.20
. Please, reopen this issue in the case when issue is still present.