Экземпляр python вызывает ошибку ResponseNot ready после запуска
import httplib2
import json
def getGeocodeLocation(inputString):
google_api_key = "AIzaSyCluVT5yELlVqmZEdOrBRub3CkKzFfVobw"
locationString = inputString.replace(" ", "+")
url = ('https://maps.googleapis.com/maps/api/ \
geocode/json?address=%s&key=%s' % (locationString, google_api_key))
h=httplib2.Http()
(response, content) = h.request(url,'GET')
result = json.loads(content)
print "response header: %s\n \n" % result
return result
возникла ошибка
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "geocode.py", line 11, in getGeocodeLocation
(response, content) = h.request(url,'GET') File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 2135, in request
cachekey, File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1796, in _request
conn, request_uri, method, body, headers File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1737, in _conn_request
response = conn.getresponse() File "/usr/lib/python2.7/httplib.py", line 1139, in getresponse
raise ResponseNotReady() httplib.ResponseNotReady
, и я не могу понять, что не так