import traceback from shutil import move from time import sleep def move_ipa(from_path: str, to_path: str): while True: try: move(from_path, to_path) return except Exception: traceback.print_exc() sleep(10)