How to restart tweepy script in case of error?
I have a python script that continuously stores tweets related to tracked keywords to a file. However, the script tends to crash repeatedly due to an error appended below. How do I edit the script so that it automatically restarts? I've seen numerous solutions including this ( Restarting a program after exception ) but I'm not sure how to implement it in my script. import sys import tweepy import json import os consumer_key="" consumer_secret="" access_key = "" access_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_key, access_secret) api =