When would this AttributeError occur? If `receipt is None`?