freebase api error on deployment to appengine: DownloadError: ApplicationError: 2

天大地大妈咪最大 提交于 2019-12-04 05:49:13

问题


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.


回答1:


Try using Freebase API key. This might help.



来源:https://stackoverflow.com/questions/10800245/freebase-api-error-on-deployment-to-appengine-downloaderror-applicationerror

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!