[Bug]: AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
See original GitHub issuePlaywright version
1.16.1
Operating system
Windows 10
What browsers are you seeing the problem on?
No response
Other information
python 3.10.0
What happened? / Describe the bug
I see AttributeError sometimes when I run playwright.
Code snippet to reproduce your bug
from playwright.sync_api import sync_playwright
for i in range(10000):
print(i)
with sync_playwright() as p:
pass
Relevant log output
Traceback (most recent call last):
File "...\scratches\scratch_1.py", line 4, in <module>
print(i)
File "...\venv\lib\site-packages\playwright\sync_api\_context_manager.py", line 71, in __enter__
playwright = self._playwright
AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:21 (3 by maintainers)
Top Results From Across the Web
attributeerror: 'playwrightcontextmanager' object ... - You.com
I see AttributeError sometimes when I run playwright. Code snippet to reproduce your bug. shell from playwright ...
Read more >Run playwright in interactive mode in Python - Stack Overflow
I know how to do the same using a script, but I was trying this in an interactive mode. from playwright.sync_api import Playwright, ......
Read more >scrapy-playwright - PyPI
A Scrapy Download Handler which performs requests using Playwright for Python. It can be used to handle pages that require JavaScript (among other...
Read more >AttributeError: 'PlaywrightContextManager' object has ... - 博客园
1.问题分析1.1. 公司云桌面win7系统把之前C盘中自带的py3.7环境给还原了,之前跑得好好的PlayWright案例不能运行了2.解决过程2.1. 参考网上的解决方案 ...
Read more >Automate web browsers with Python and Playwright
Using Playwright to control Chromium, Firefox, or WebKit with Python ... are mostly the same except how you access the Playwright object.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mxschmitt The op was windows 10, not 7
i followed the official example
and i got this bug:
platform: windows 7 nodejs v13.14.0 playwright python 1.17.0 python 3.8.10