def widget_error(self, error_msg: str):
        """
        Cause the widget to display an error
        and log the given error message
        """
        self.error = error_msg
        logger.exception(self.error)
        self.update("Redshift widget crashed!")

        Cause the widget to display an error
        and log the given error message
        
libqtile/widget/redshift.py