def build(self): sm2 = ScreenManager() box = BoxLayout(orientation='vertical', padding=(50)) label2 = ScrollableLabel(text=self.label_info) box.add_widget(label2) button = Button(text="Close", size_hint_y=None, height=200, on_press=quit) box.add_widget(button) popup = Popup(title='Caught Exception - Error', content=box) screen = Screen() screen.name = "errorScreen" screen.label = label2 screen.add_widget(popup) sm2.screen_error = screen sm2.add_widget(screen) return sm2