Skip to content

[BUG] AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright' #1565

@mborsetti

Description

@mborsetti

Context:

  • Playwright Version: 1.26.0
  • Operating System: Windows 11 Pro version 10.0.22000 Build 22000
  • Python version: 3.10.7
  • Browser: Google Chrome 105.0.5195.127 (Official Build) (64-bit)
  • Extra: node v18.9.1

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally.

>>> from playwright.sync_api import sync_playwright
>>> with sync_playwright() as p:
...     browser = p.chromium.launch(channel='chrome')
...
'""C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python\Python310\lib\site-packages\playwright\sync_api\_context_manager.py", line 89, in __enter__
    playwright = self._playwright
AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'
>>>

Describe the bug

AttributeError: 'PlaywrightContextManager' object has no attribute '_playwright'

Add any other details about the problem here.

Also weird output

'""C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions