更新时间:2021-12-21 23:14:40
它在这里发生:
with open(os.path.join(root, documento), 'r') as fin:
因此您已打开并锁定了文件,这就是为什么您无法使用以下方式删除此文件夹的原因:
So you have your file open and locked, that is why you are not able delete this folder using:
shutil.rmtree(root)
在此语句内,您必须在with
语句外
within this statement, you have to do outside of with
statement