部署到appengine上的freebase api错误:DownloadError:ApplicationError:2 [英] freebase api error on deployment to appengine: DownloadError: ApplicationError: 2
问题描述
我使用google.appengine.api urlfetch来执行以下freebase MQL查询:
https:// api .freebase.com / api / service / mqlread?queries = {q1:{query:[{subjects:[{name | =:[doubt,trust]}], type:/ media_common / quotation,name:null,author:[]}]}}
这在我的本地设置上按预期工作。一旦我部署到Google AppEngine,我收到以下错误:
$ b $ pre $ 文件/ base / python_runtime / python_lib / versions / 1 / google /appengine/api/urlfetch.py,第263行,获取
返回rpc.get_result()
文件/ base / python_runtime / python_lib / versions / 1 / google / appengine / api / apiproxy_stub_map。 py,第604行,在get_result
中返回self .__ get_result_hook(self)
文件/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py,第365行,在_get_fetch_result中
提升DownloadError(str(err))
DownloadError:ApplicationError:2
<从我的谷歌搜索它看起来像freebase可能阻止appengine的请求。我尝试使用 http://wiki.freebase.com/wiki/Google_API_Client_Libraries#Python 结果相同。
尝试使用Freebase API密钥。这可能有帮助。
I'm using google.appengine.api urlfetch to preform the following freebase MQL query:
https://api.freebase.com/api/service/mqlread?queries={"q1": {"query": [{"subjects": [{"name|=": ["doubt","trust"]}], "type": "/media_common/quotation", "name": null, "author": []}]}}
This works as expected on my local setup. Once I deploy to Google AppEngine I get the following error:
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 263, in fetch
return rpc.get_result()
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 604, in get_result
return self.__get_result_hook(self)
File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 365, in _get_fetch_result
raise DownloadError(str(err))
DownloadError: ApplicationError: 2
From my google searches it looks like freebase may be blocking the request from appengine. I have tried using http://wiki.freebase.com/wiki/Google_API_Client_Libraries#Python with the same results.
Try using Freebase API key. This might help.
这篇关于部署到appengine上的freebase api错误:DownloadError:ApplicationError:2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!