rmtree python throws error on folder which exist code example Example: python dlete folder import shutil shutil.rmtree('/folder_name')