【问题标题】:Unexpected attribute 'indexes' error while following GAE tutorial遵循 GAE 教程时出现意外的属性“索引”错误
【发布时间】:2013-09-16 16:01:28
【问题描述】:

我正在关注谷歌应用引擎入门教程。我在这一点上; https://developers.google.com/appengine/docs/python/gettingstartedpython27/templates

我试图按照它的重点,但是当我从谷歌应用引擎启动器启动我的应用程序时,我在日志中看到了这个;

---- a long traceback, followed by ---- 
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\yaml_listener.py", line 177, in _HandleEvents
    raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: Unexpected attribute 'indexes' for object of type AppInfoExternal.
  in "C:\Users\muhammed\Desktop\guestbook\app.yaml", line 18, column 1
2013-09-12 13:01:26 (Process exited with code 1)

这是我的app.yaml 文件的样子;

application: your-app-id
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: guestbook.application

libraries:
- name: webapp2
  version: latest
- name: jinja2
  version: latest

indexes:
- kind: Greeting
  ancestor: yes
  properties:
  - name: date
    direction: desc

我在这里做错了什么?

【问题讨论】:

    标签: google-app-engine python-2.7 yaml


    【解决方案1】:

    本教程没有告诉您将索引放入 app.yaml。它们放在一个单独的文件 index.yaml 中。但是您通常不必费心,因为当您在本地运行代码时,开发服务器会为您创建它们。

    【讨论】:

    • 谢谢。我一定错过了。
    猜你喜欢
    • 1970-01-01
    • 2014-12-17
    • 2023-03-17
    • 2011-09-03
    • 2020-04-05
    • 1970-01-01
    • 2020-05-07
    • 2012-09-24
    • 1970-01-01
    相关资源
    最近更新 更多