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

artifacts_folder.cleanup() raises PermissionError: [WinError 32] #163

Closed
geiregjo opened this issue Apr 20, 2023 · 0 comments · Fixed by #191
Closed

artifacts_folder.cleanup() raises PermissionError: [WinError 32] #163

geiregjo opened this issue Apr 20, 2023 · 0 comments · Fixed by #191
Assignees
Labels
bug Something isn't working

Comments

@geiregjo
Copy link

geiregjo commented Apr 20, 2023

Context:
Playwright Version: 1.31.1
Pytest Version: 7.2.0
Pytest Playwright Version: 0.3.2
Operating System: Windows
Python version: Python 3.10
Browser: Chromium

Describe the bug
Sometimes, when Pytest is cleaning up the artifacts a PermissionError is raised. It seems that the .webm file in artifacts_folder is still in use by another process. Currently I don't know how to reproduce the issue.

Before, I thought that this issue was caused by Pytest Parallel.

From Python 3.10 cleanup errors can easily be ignored using the TemporaryDirectory ignore_cleanup_errors kwarg. Not sure how to handle it in lower Python versions?

Stacktrace
Note that a NotADirectoryError is raised instead of a PermissionError. This is caused by an issue in cpython.

stacktrace.txt

@mxschmitt mxschmitt added the bug Something isn't working label Oct 10, 2023
@mxschmitt mxschmitt self-assigned this Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants