Can';在Python中无法从地图服务获取图像

Can';在Python中无法从地图服务获取图像,python,google-maps,python-3.x,Python,Google Maps,Python 3.x,我试图用python获得地图服务的图像。 谷歌静态地图和mapquestapi.com不起作用。当我尝试从其他服务器检索静态图像时,一切正常,但在“地图服务”中,我遇到以下错误: ERROR handlers: message: plugins.xxx._scan_for_triggers : coroutine Traceback (most recent call last): File "/xxx/handlers.py", line xxx, in run_pluggable_omnib

我试图用python获得地图服务的图像。 谷歌静态地图和mapquestapi.com不起作用。当我尝试从其他服务器检索静态图像时,一切正常,但在“地图服务”中,我遇到以下错误:

ERROR handlers: message: plugins.xxx._scan_for_triggers : coroutine
Traceback (most recent call last):
File "/xxx/handlers.py", line xxx, in run_pluggable_omnibus
yield from function(*_passed)
File "/xxx/plugins/xxx.py", line 54, in _scan_for_triggers
img_id = yield from xxx._client.upload_image(img_data, filename=filename)
File "/usr/local/lib/python3.4/site-packages/xxx/client.py", line 472, in upload_image
upload_url = (json.loads(res1.body.decode())['sessionStatus']
KeyError: 'sessionStatus'
代码如下:

r = yield from aiohttp.request('get', img_link)
raw = yield from r.read()
img_data = io.BytesIO(raw)
filename = "xxx"
img_id = yield from xxx._client.upload_image(img_data, filename=filename)

我修好了。img_链接是一个字符串,包括参数。 我必须用urllib.parse.urlencode构建url