Python AttributeError: ‘bool‘ object has no attribute ‘ui‘

Error code:

 

 

  The defined method is a static function. In fact, the function content is not static, so an error occurs when calling. Just delete @ staticmethod.

Correct code:

 

 

Read More: