s/AttributeError/TypeError
s/figure/output