# os.remove of open file: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/os-remove-of-open-file-permissionerror-winerror-32-the-process-cannot-access-the-file-because-it-is-1c0be4a3fc8b
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: python, permissionerror, windows

Opened sv.txt for write and called os.remove in the same process. A ResourceWarning for the unclosed file followed at exit.
