Closed wordhui closed 2 years ago
Thanks for submitting this issue, I will try to fix it asap.
Thanks for submitting this issue, I will try to fix it asap.
This plugin is very practical, thank you very much, I hope it will become more and more stable in the future
Supplementary description, The version of playwright is 1.12.0
@wordhui Could you please provide more context?
I can not reproduce this issue with the latest version of plugin and python 3.8.
@uriyyo My version of Python, from minconda
(py38) D:\>python
Python 3.8.8 (default, Feb 24 2021, 15:54:32) [MSC v.1928 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
The version of playwright is 1.12.0
(py38) D:\>pip list |findstr "playwright"
playwright 1.12.0
The versions of pycharm and plugins are explained above
If the bug cannot be reproduced, I will continue to use the plug-in. If I find more information about the bug, I will update the situation
@wordhui Maybe it some kind of win specific issue, I will try to investigate and find root cause of this problem.
@uriyyo After my test, Python3.9 and Python3.8 created in minconda using the evaluate-async-code plug-in to debug the above code will have the above problem, but using the above plug-in in Python3.7 created by minconda will not have this problem, maybe Related to minconda or Python version In order to be able to reproduce this problem, I packaged my local minconda Python environment to Google Cloud Disk, you can download it, and assign the python interpreter in pycharm to my virtual environment, and then debug the above code to see if it can be reproduced This problem, if Ren can not reproduce this problem, I guess there is no way to reproduce it in a short time
Download link for my virtual environment: https://drive.google.com/file/d/12F1DCsooTOFIiD0HVKcaaQZG3DTC8DHi/view?usp=sharing
In pycharm, point the Python interpreter to the python3.9 virtual environment I uploaded
Debugging the code will reproduce this problem
Thanks, I will take a look
Thanks, I will take a look
Thank you The above invalid picture, I updated it again, you can see the bug reproduction steps from the picture
Hi @wordhui,
New version 1.14
has been released. Do you still have an issue with plugin?
Hi @wordhui,
New version
1.14
has been released. Do you still have an issue with plugin?
I upgraded to version 1.14, the above problem still exists If I have time, I will copy the Python environment of this computer to another computer for testing to see if it is a special environmental problem of this computer.
D:\App\Minconda\envs\py39\python.exe C:\Users\hui\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 5819 --file D:/workspace/BaoBao/other/sticapply/pw_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/other/sticapply/pw_t.py", line 5, in <module>
playwright = manager.start()
File "D:\App\Minconda\envs\py39\lib\site-packages\playwright\sync_api\_context_manager.py", line 75, in start
return self.__enter__()
File "D:\App\Minconda\envs\py39\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 493, in <module>
run_path(sys.argv.pop(1), {}, "__main__")
File "D:\App\Minconda\envs\py39\lib\runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "D:\App\Minconda\envs\py39\lib\runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "D:\App\Minconda\envs\py39\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/other/sticapply/pw_t.py", line 5, in <module>
playwright = manager.start()
File "D:\App\Minconda\envs\py39\lib\site-packages\playwright\sync_api\_context_manager.py", line 75, in start
return self.__enter__()
File "D:\App\Minconda\envs\py39\lib\site-packages\playwright\sync_api\_context_manager.py", line 70, in __enter__
playwright = self._playwright
AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
Hi @wordhui,
Could you please try to upgrade to version 1.20
and check if this issue is still present?
I am closing this issue, please reopen it in case if the issue is still present.
After installing the plug-in, the following error will appear when running the following code in debug mode: --> attributeerror: 'playwrightcontextmanager' object has no attribute '_ playwright'
The complete code is as follows
The complete error report is as follows
Full code screenshot
Complete error report screenshot
pycharm version
Plug-in version