python can't remove a file after closing it, “being used by another process”

后端 未结 4 1381
南笙
南笙 2020-12-18 21:41

I am trying to remove a file after reading from it, but getting \"WindowsError: [Error 32] The process cannot access the file because it is being used by another process\"

4条回答
  •  青春惊慌失措
    2020-12-18 22:25

    Another possibility is that a virus checker still has the file open at the time you try to delete or rename it. This doesn't happen often but when it does, it's really annoying to track down.

提交回复
热议问题