使用get_serving_url_async从blobstore异步提供映像时出错

时间:2016-04-29 20:18:41

标签: python google-app-engine url asynchronous blobstore

我试图从博客商店获取图片的网址。在使用webapp2和python。

我这样做:

from google.appengine.api.images import get_serving_url_async ... upload = self.get_uploads()[0] blob_key = upload.key() url = yield get_serving_url_async(blob_key, secure_url = True)

我收到错误消息:

> Traceback (most recent call last):
> 
>   File "C:\Program Files
> (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1522,
> in __call__
> 
>     return response(environ, start_response)
> 
> TypeError: 'generator' object is not callable
> 
> ERROR    2016-04-29 20:02:28,489 wsgi.py:279] 
> 
> Traceback (most recent call last):
> 
>   File "C:\Program Files
> (x86)\Google\google_appengine\google\appengine\runtime\wsgi.py", line
> 267, in Handle
> 
>     result = handler(dict(self._environ), self._StartResponse)
> 
>   File "C:\Program Files
> (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1524,
> in __call__
> 
>     return self._internal_error(e)(environ, start_response)
> 
>   File "C:\Program Files
> (x86)\Google\google_appengine\lib\webapp2-2.3\webapp2.py", line 1522,
> in __call__
> 
>     return response(environ, start_response)
> 
> TypeError: 'generator' object is not callable

使用时一切正常:

url = get_serving_url(blob_key, secure_url = True)

我找不到获取异步下载网址的方法。

有人知道错误在哪里吗?网络上关于如何运作的内容很少。

感谢。

0 个答案:

没有答案