我认为问题在于您如何定义相关的公司架构:
JawboneUP3 = item(itemID = "1", name = "Jawbone UP3", description = "The latest UP!", category = "tracker", price = "$174.99", company = "Jawbone") # HERE^
该
item构造函数需要一个
company实例,但你传递一个字符串值。修理它:
JawboneUP3 = item(itemID="1", name="Jawbone UP3", description="The latest UP!", category="tracker", price="$174.99", company=company(name="Jawbone"))



