Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(driver): AttributeError error when CWD contains space #19801

Merged

Conversation

hylkepostma
Copy link
Contributor

Using Playwright (1.29.0, Python 3.10.2 on Windows 11) from a path containing spaces, for example C:\Program Files (x86)\My App Name With Spaces\, gives the following error message:

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

This PR is based on the fix suggested by @funnydevdotvn.

In the [...]Lib\site-packages\playwright\driver\playwright.cmd file, %~dp0\node.exe must be in quotes to handle spaces properly.

Because the playwright.cmd file is generated from utils\build\run-driver-win.cmd, you'll find the change there.

This improves the solution from related PR #17579.

@pavelfeldman
Copy link
Member

Could you explain what you are trying to fix? It is unlikely that this file is used in your scenario.

Copy link
Member

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, was able to reproduce and it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants