title: How do I fix a "JSONDecodeError: No JSON object could be decoded: line 1 column 0 (char 0)"?
body: <p>I'm trying to get Twitter API search results for a given hashtag using Python, but I'm having trouble with this "No JSON object could be decoded" error. I had to add the extra % towards the end of the URL to prevent a string formatting error. Could this JSON error be related to the extra %, or is it caused by something else? Any suggestions would be much appreciated. </p>
  
  <p>A snippet:</p>
  
  <pre><code>import simplejson
  import urllib2
  
  def search_twitter(quoted_search_term): 
      url = "http://search.twitter.com/search.json?callback=twitterSearch&amp;q=%%23%s" % quoted_search_term
      f = urllib2.urlopen(url)
      json = simplejson.load(f)
      return json
  </code></pre>