def handler(): try: exec(open('spotifycontroller.py').read()) except: print("An error has ocurred, reestablishing the application now.") exec(open('spotifycontroller.py').read())