playwright-python: [Bug]: AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
Playwright 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'
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 21 (3 by maintainers)
@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
@phoenixor I’m running into this same issue, were you able to fix it/find a workaround?