https://stackoverflow.com/questions/533 ... r-python-3
This code will usually trigger an on_error method if there is a problem, but in my case it does not. I had to enclose the stream in a try block to prevent it from crashing completely.
Code: Select all
## try to ignore http errors crashing the system
while True:
try:
stream.statuses.filter(follow=users, language = 'en')
except:
e = sys.exc_info()[0]
print('ERROR:',e )
continue