0
我有这样一个简单的数据模型:无法访问所有的实体在数据存储GAE
class Player(db.Model):
name = db.StringProperty()
要保存球员,我这样做:
player = Player(name="TestUser")
player.put()
它没有错误在走出这一步,但是当我尝试使用访问所有的项目是:
for player in Player.all():
print(player.name)
我得到以下错误:
RuntimeError: EventError(ValidationError(u"Unexpected attribute '\u200bindexes' for object of type IndexDefinitions.",),)
我index.yaml
包含以下内容:
indexes:
- kind: Player
ancestor: no
properties:
- name: name
对这个问题的深入了解将是巨大的,谢谢!
文件的那部分看起来像它会验证。也许在index.yaml – bernie
其他地方有问题尝试删除您的index.yaml dev上自动生成。你能发布整个文件吗? –
看起来像index.yaml中可能存在缩进问题或特殊字符。注意错误“Unexpected attribute'\ u200bindexes”我的赌注是一些unicode字符在那里。就在“索引”声明之前。 –