title: Python error load JSON code of google API
body: <p>I am using google geocode API to test the following Python3.5 code but receive the error below.</p>
  <blockquote>
  <p>raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None &gt;JSONDecodeError: Expecting value</p>
  </blockquote>
  <p>Here are the codes:</p>
  <pre><code>import urllib
  import json
  
  serviceurl = 'http://maps.googleapis.com/maps/api/geocode/json?'
  
  while True:
      address = input('Enter location: ')
      if len(address) &lt; 1 : break
  
      url = serviceurl + urllib.parse.urlencode({'sensor':'false',
         'address': address})
      print ('Retrieving', url)
      uh = urllib.request.urlopen(url)
      data = uh.read()
      print ('Retrieved',len(data),'characters')
  
      js = json.loads(str(data))
  </code></pre>
  <p>Any idea about why I have the error.</p>