部署到 appengine 时的 freebase api 错误:下载错误:应用程序错误:2 [英] freebase api error on deployment to appengine: DownloadError: ApplicationError: 2

查看:14
本文介绍了部署到 appengine 时的 freebase api 错误:下载错误:应用程序错误:2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 google.appengine.api urlfetch 执行以下 freebase MQL 查询:

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": []}]}}

这在我的本地设置中按预期工作.部署到 Google AppEngine 后,我收到以下错误:

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

从我的谷歌搜索来看,似乎 freebase 可能阻止了来自 appengine 的请求.我曾尝试使用 http://wiki.freebase.com/wiki/Google_API_Client_Libraries#Python具有相同的结果.

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.

推荐答案

尝试使用 Freebase API 密钥.这可能会有所帮助.

Try using Freebase API key. This might help.

这篇关于部署到 appengine 时的 freebase api 错误:下载错误:应用程序错误:2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆