Google App Engine需要索引错误

时间:2009-10-18 04:41:17

标签: google-app-engine

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

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

编辑:我在我的app.yaml中添加了“indices:”行,现在app引擎报告索引正在构建,所以我认为这是固定的。考虑到我从未碰过它,这个文件是错误的,这很奇怪。

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
      ^

4 个答案:

答案 0 :(得分:7)

如果index.yaml的第一行(在第1列中应该只有“index:”)已被删除,则会发生此错误。

答案 1 :(得分:1)

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

答案 2 :(得分:1)

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服务器开发会自动在模型的每一列上创建索引,你提到你的索引应该是指定的coloumn

答案 3 :(得分:0)

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