python rename(old, new) FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。

今天在处理一批数据,写代码时遇到这样的bug,先是没反应过来,后面debug时发现问题:
python rename(old, new) FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。
os.renames(old_path, new_path)报错
python rename(old, new) FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。
实际上debug发现,closed_0021_01已存在,因此报“当文件已存在时,无法创建该文件
python rename(old, new) FileExistsError: [WinError 183] 当文件已存在时,无法创建该文件。