diff --git a/steam/items.py b/steam/items.py index d25122e..6b0dfc0 100644 --- a/steam/items.py +++ b/steam/items.py @@ -652,7 +652,8 @@ def __init__(self, item, schema=None): if schema: attrdef = schema._attribute_definition(index) - index = attrdef["defindex"] + if attrdef: + index = attrdef["defindex"] self._attributes.setdefault(index, {}) @@ -666,7 +667,10 @@ def __init__(self, item, schema=None): index = attr["defindex"] if schema and index not in self._attributes: - self._attributes[index] = schema._attribute_definition(index) + attrdef = schema._attribute_definition(index) + + if attrdef: + self._attributes[index] = attrdef self._attributes.setdefault(index, {}) self._attributes[index].update(attr)