I'm trying to write out document using ExcelWriter and encountered the following problem:
when I run my program, it sometimes gives the warning as follows:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\...\AppData\\Local\\Temp\\tmpk6915sp2'
It is said that the error is from the ExcelWriter .save()
method.
I tried to use the .close()
method of ExcelWriter, but sometimes the problem still persists. What I mean by sometimes is that if I re-run the program several times, the program just runs like there's no error.
The thing that I don't understand is that why does it /sometimes/ still persists, and how do I solve it?
I encountered several threads with same error but they don't relate to ExcelWriter, I hope anyone could help me. Thanks in advance!