title: HTTPResponse' object has no attribute 'decode
body: <p>I was getting the following error initially when I was trying to run the code below-</p>
  
  <pre><code>Error:-the JSON object must be str, not 'bytes' 
  
  import urllib.request
  import json
  search = '230 boulder lane cottonwood az'
  search = search.replace(' ','%20')
  places_api_key = 'AIzaSyDou2Q9Doq2q2RWJWncglCIt0kwZ0jcR5c'
  url = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query='+search+'&amp;key='+places_api_key
  json_obj = urllib.request.urlopen(url)
  data = json.load(json_obj)
  for item in  data ['results']:
       print(item['formatted_address'])
       print(item['types'])
  </code></pre>
  
  <p>After making some troubleshooting changes like:-</p>
  
  <pre><code> json_obj = urllib.request.urlopen(url)
   obj = json.load(json_obj)
   data = json_obj .readall().decode('utf-8')
  
   Error - 'HTTPResponse' object has no attribute 'decode'
  </code></pre>
  
  <p>I am getting the error above, I have tried multiple posts on stackoverflow nothing seem to work. I have uploaded the entire working code if anyone can get it to work I'll be very grateful. What I don't understand is that why the same thing worked for others and not me.
  Thanks!  </p>