【发布时间】:2012-07-09 10:33:44
【问题描述】:
我需要在 GAE 上使用 Python 从 Freebase 查询大约 30000 个实体。到目前为止,这是我晚上的旅程:
首先,我尝试使用此处使用“光标”键的解决方案:how to increase freebase API result limit。但是我遇到了此处描述的“键光标是保留字”错误:Freebase "Key cursor is a reserved word"。我遵循了解决方案,但我看不到如何恢复光标值,如下所述:How to get cursor from mqlread() when using Freebase API?。这篇文章推荐使用 python freebase 库:
freebase.mqlread(query, extended=True)
所以我按照此处的说明在 GAE 上安装了 freebase 库:http://code.google.com/p/freebase-python/wiki/GoogleAppEngine。接下来,我得到了 GAE 错误:
No module named uritemplate
所以我在我的 Mac 上运行“easy_install uritemplate”并将安装的 uritemplate.egg 文件(没有安装目录)复制到我的 GAE 应用程序目录中。但我仍然遇到同样的错误。
【问题讨论】:
-
您可以发布您的 App Engine 应用目录的目录布局吗?
标签: python google-app-engine python-2.7 freebase