title: Tweets with Coordinates Tweepy python
body: <p>I am trying to use Streaming Api of twitter and tweepy to get some tweets  filtered by some keywords(already done) and their coordinates which I can later plot on google map. However i am getting an error when I am executing the following code to store only those tweets where coordinates are not null.</p>
  
  <p>Code:</p>
  
  <pre><code>def on_data(self, data):
  
      json_object = json.loads(data)
      if (json_object["user"]["coordinates"]!="null"):
          f.write(data)
  </code></pre>
  
  <p>After some time I get an error that says </p>
  
  <blockquote>
    <p><code>Key error:user</code></p>
  </blockquote>
  
  <p>Can anybody tell me the reason why this error happened and what steps can be taken to resolve or understand this error better.</p>