_消息\uu解码\u字段属性错误这是什么意思?

2024-03-28 19:27:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我想使用结构化属性,并创建了一个非常简单的示例。你知道吗

class StudentScore(EndpointsModel):
  name = ndb.StringProperty()
  mark = ndb.StringProperty()

class MyModel(EndpointsModel):
  scores = ndb.StructuredProperty(StudentScore)

但是,我在尝试放置()时出错。你知道吗

AttributeError: 'StudentScore' object has no attribute '_Message__decoded_fields'


Tags: name示例属性objectclassmymodel结构化attributeerror