You probably meant to call "self.clear_attrs()" here.