Remove AttributeError: widget error