title: Tweepy returns tweets on my mac but not on ubuntu AWS instance, instead it exits with no errors
body: <p>I am trying to use Tweepy to return a sample of Tweets. I successfully am able to receive and parse Tweets when I run the .py file on my Mac, however when running the same code in a Ubuntu instance on AWS EC2, the streaming connection is not kept open and the file closes.</p>
  
  <p>I have tried to work out if Twitter is throwing any errors, however a try, except block does not throw any errors.</p>
  
  <pre class="lang-py prettyprint-override"><code>class CustomStreamListener(tweepy.StreamListener):
      def on_status(self, status):
          print (status.text)
  
  #Sets up our streaming listener
  streaming_api = tweepy.streaming.Stream(auth, CustomStreamListener(), timeout = 1000)
  
  #Calls the streaming listener
  def streaming():
      try:
          print ("Starting Streaming")
          streaming_api.sample()
          print("Still streaming")
      except Exception as e:
          print (e)
          print (sys.stderr, 'Encountered Exception:', e)
          time.sleep(600)
          streaming()
  
  #Calls our streaming function
  streaming()
  </code></pre>
  
  <p>On my mac it successfully prints the tweets and retains an active connection.</p>
  
  <p>When I upload the file to the Ubuntu EC2 instance and run it it only returns:
  "Starting Streaming"
  "Still Streaming"
  and then exits the program.</p>