def createParentTask(self,name,description,duration, deadline): self.task.name = name self.task.description = description self.task.duration = int(duration) self.task.deadline = deadline Task.updateTask(self.task) self.clear_widgets() print('app is running') popup = Popup(title='You have created a new task!',auto_dismiss=False) popup.size_hint = 0.25,0.25 content = Button(text='Close me!',size_hint_y = .10) popup.add_widget(content) # bind the on_press event of the button to the dismiss function content.bind(on_press=popup.dismiss) popup.open()