tweepy/tweepy — Issue #137: Streaming API not responding after few hours
Author: binnyg
Created: 2011-11-28 03:31:23+00:00
State: open

Very often twitter stream contains a response without any data so it goes to infinite loop.

So changing line tweepy/streaming.py#147

from

if c == '\n':

to

if not c or c == '\n':

fixed the issue. This will break the loop and continue with the next response object.