如果我把它作为一个单独的模块运行,它可以正常工作,但是当我在另一个py文件中将它作为一个方法调用时,它会在第二次循环后停止并抛出以下错误:
for rownum in range(1, ws_read_execution_report_max_rows):
shutil.copy(pdf_file_path, pdf_archive_path)
if os.path.isfile(pdf_file_path):
os.remove(pdf_file_path)
引发异常:
[WinError 32] The process cannot access the file because it is being used by another process
暂无答案!
目前还没有任何答案,快来回答吧!