title: UnboundLocalError: local variable 'resp' referenced before assignment
body: <p>This appears to be a very common error with a few different solutions,
  <a href="https://stackoverflow.com/questions/10623093/python-unboundlocalerror-local-variable-open-referenced-before-assignment">python: UnboundLocalError: local variable &#39;open&#39; referenced before assignment</a> </p>
  
  <p><a href="https://stackoverflow.com/questions/2256056/python-help-with-unboundlocalerror-local-variable-referenced-before-assignment">Python: Help with UnboundLocalError: local variable referenced before assignment</a></p>
  
  <p>Where my question is different is that I don’t have a variable "resp" in the code I am running. Most of the other questions were posted because the poster used the same name for a class and variable or they failed to declare it as a global variable.</p>
  
  <p>The Code</p>
  
  <pre><code>import tweepy
  auth = tweepy.OAuthHandler('75VSSMGC4pfUB5u0Zt5G3Q', '2olQeiquDg71uwnGoU2c9e2u3qy2LrKkn2p6KWBIdI')
  auth.set_access_token('122095773-cCrYa4FWFoBkx44LES8yeBlt8DTG0jnZivJ79k2J', 'p1Nmp9DaPUIThpTamzIMfdvJu0wgdfxmghdwsSagM')
  api = tweepy.API(auth)
  
  print api.rate_limit_status()
  #print tweepy.api.rate_limit_status()
  </code></pre>
  
  <p>The Error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/brendan/Documents/workspace/Tweeter/src/rate_limit.py", line 6, in &lt;module&gt;
      print api.rate_limit_status()
    File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 185, in _call
    File "build/bdist.macosx-10.5-fat3/egg/tweepy/binder.py", line 147, in execute
  UnboundLocalError: local variable 'resp' referenced before assignment
  </code></pre>
  
  <p>Any suggestions? </p>