trap AttributeError