【问题标题】:Large Freebase query with python 2.7 on GAE在 GAE 上使用 python 2.7 进行大型 Freebase 查询
【发布时间】: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


【解决方案1】:

这是一个如何使用游标的示例: http://wiki.freebase.com/wiki/MQL_Read_Service#cursor:_return_albums_by_Bob_Dylan_3_at_a_time

您不应使用 freebase-python 库,因为它尚未更新以处理新的 googleapis。

【讨论】:

    猜你喜欢
    • 2012-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-22
    相关资源
    最近更新 更多