问题描述:

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.

相关阅读:
Top