PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'students.txt' -> 'students.txt.bak' code example
Example 1: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'students.txt' -> 'students.txt.bak'
I also ran into this error because,
I was opening the file whe it was already open
make sure that you are doing it right
Example 2: PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
import shutil
shutil.rmtree('config')