【问题标题】:Google App Engine Needs Index ErrorGoogle App Engine 需要索引错误
【发布时间】:2010-12-07 17:29:00
【问题描述】:

我目前在我的应用引擎应用程序上遇到需求索引错误:http://www.gaiagps.com/wiki/home。我相信这个索引应该是由我的 index.yaml 文件自动创建的(见下文)。

谷歌搜索了一下,我想我只需要等待我的索引建立。这是正确的,还是我需要手动做一些事情?是否有某种索引构建队列?我的桌子现在非常非常小。

编辑:我在 app.yaml 中添加了“indexes:”行,现在应用引擎报告索引正在构建,所以我认为这是固定的。奇怪的是这个文件是错误的,因为我从来没有接触过它。

indexes:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run.  If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED").  If you want to manage some indexes
# manually, move them above the marker line.  The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

- kind: Revision
  properties:
  - name: name
  - name: created

该应用可以在我的开发服务器上运行,但不能在生产环境中运行。但是,在我的开发控制台上,我注意到了这个错误(编辑:这个错误现在我已经添加了索引:到上面的 app.yaml 文件):

ERROR    2009-10-18 04:46:51,908 dev_appserver_index.py:176] Error parsing /gaiagps.com/index.yaml:

'NoneType' object is not callable
  in "<string>", line 13, column 3:
    - kind: Revision
      ^

【问题讨论】:

  • 为什么有人要结束这个问题?

标签: google-app-engine


【解决方案1】:

如果 index.yaml 的第一行(从第 1 列开始应该只有“indexes:”)被删除,则会出现此错误。

【讨论】:

    【解决方案2】:

    索引不包含在 app.yaml 文件中,它们需要放在 index.yaml 中

    【讨论】:

      【解决方案3】:
      delete    AUTOGENERATED
      
      # This index.yaml is automatically updated whenever the dev_appserver
      # detects that a new type of query is run.  If you want to manage the
      # index.yaml file manually, remove the above marker line (the line
      # saying "# AUTOGENERATED").  If you want to manage some indexes
      # manually, move them above the marker line.  The index.yaml file is
      # automatically uploaded to the admin console when you next deploy
      # your application using appcfg.py.
      

      这一行,因为当你写这行时,Web 服务器开发会自动在模型的每一列上创建索引,并且你提到你的索引应该在指定的列上

      【讨论】:

        【解决方案4】:

        我相信您需要将索引添加到您的 app.yaml 文件中。此外,当您推送到 AppEngine 时,生成索引需要一些时间,因为您构建索引的请求将与其他所有人一起被简单地放入作业队列中。

        【讨论】:

          猜你喜欢
          • 2019-01-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-01-17
          • 2015-06-30
          • 2013-07-10
          • 1970-01-01
          相关资源
          最近更新 更多