title: Popup in Kivy Python does not get dismissed for more than one time
body: <p>I have made a popup to show up when an error occurs, with a button that closes the popup when clicked. All worked well until I tried getting an error for 2 times. In the second time the popup did not close and I am wondering if there is a way to work it out.</p>
  <p>This is the python code:</p>
  <pre><code>
  class MyPopup(Popup):
      filechooser= ObjectProperty(None)
  
  class ErrorPopup(Popup):
      filechooser= ObjectProperty(None)
  
  
  class Main(FloatLayout):
      audio_check= ObjectProperty(None)
      video_check= ObjectProperty(None)
      spinner_id= ObjectProperty(None)
      yt_link=ObjectProperty(None)
      name=ObjectProperty(None)
      error_label=ObjectProperty(None)
      def submit_text(self):
          self.error_popup=MyApp()
          if self.audio_check.active and self.video_check.active:
              try:
                  YouTube(self.yt_link.text).streams.filter(res=self.spinner_id.text).first().download(path, filename=self.name.text+'.mp4')
              except:
                  self.error_popup.error()
          elif self.audio_check.active and not self.video_check.active:
              try:
                  YouTube(self.yt_link.text).streams.filter(only_audio=True).first().download(path, filename=self.name.text+'.mp3')
              except:
                  self.error_popup.error()
          elif not self.audio_check.active and self.video_check.active:
              try:
                  YouTube(self.yt_link.text).streams.filter(res=self.spinner_id.text, only_video =True).first().download(path, filename=self.name.text+'.mp4')
              except:
                  self.error_popup.error()
          elif not self.audio_check.active and not self.video_check.active:
              self.error_popup.error()
      def spinner_clicked(self, value):
          self.ids.spinner_id.text= value
      
  
  
  class MyApp(App):
      def build(self):
          return Main()
      def open_popup(self):
          self.popup = MyPopup()
          self.popup.open()
  
      def dismiss_popup(self):
          self.popup.dismiss()
          global path
          path=self.popup.filechooser.path
      
      def error(self):
          self.error_popup= ErrorPopup()
          self.error_popup.open()
      def try_again(self):
          self.error_popup.dismiss()
          print(&quot;Andrew&quot;)
  
  
              
  
  
  if __name__ == '__main__':
      MyApp().run()
  </code></pre>
  <p>This is the kivy code:</p>
  <pre><code>&lt;MyPopup&gt;:
      auto_dismiss: False
      title: &quot;Select a folder&quot;
      filechooser: filechooser
      FloatLayout:
          FileChooserIconView:
              id: filechooser
          Button:
              id:my_button
              text: 'Save'
              size_hint: (0.1, 0.1)
              pos_hint:{'x': 0, 'y': 0}
              on_release: app.dismiss_popup()
  
  &lt;ErrorPopup&gt;:
      title: &quot;Error&quot;
      Button:
          text: &quot;Try Again&quot;
          on_release: app.try_again()
  
  
  
  
  
  &lt;Main&gt;:
      audio_check: audio_check
      video_check: video_check
      spinner_id: spinner_id
      yt_link: yt_link
      name: name
      folder_button: folder_button
      BoxLayout:
          orientation:'vertical'
          cols: 4
          Label:
              text: &quot;YouTube Downloader&quot;
              halign: 'center'
              bold: True
              font_size:'50sp'
          TextInput:
              id: yt_link
              size_hint: (.5, .2)
              multiline: False
              hint_text: 'Enter the link of the Youtube video you want to download.'
              pos_hint: {&quot;x&quot;: 0.25}
          TextInput:
              id: name
              size_hint: (.5, .2)
              multiline: False
              hint_text: 'Enter the name you want the file to have.'
              pos_hint: {&quot;x&quot;: 0.25}
          BoxLayout:
              cols:4
              BoxLayout:
                  Label:
                      text: &quot;Audio:&quot;
                      halign: 'center'
                      font_size:'20sp'
                  CheckBox:
                      id: audio_check
              BoxLayout:
                  Label:
                      text: &quot;Video:&quot;
                      halign: 'center'
                      font_size:'20sp'
                  CheckBox:
                      id: video_check
              FloatLayout:
                  Spinner:
                      id: spinner_id
                      text: &quot;Quality&quot;
                      values: ['144p', '240p', '360p', '480p', '720p', '1080p', '1440p', '2160p']
                      on_text: root.spinner_clicked(spinner_id.text)
                      size_hint: None, None
                      size: 130, 50
                      pos_hint: {'x': .2, 'y':.4}
              FloatLayout:
                  Button:
                      id:folder_button
                      text: 'Folder'
                      on_release: app.open_popup()
                      size_hint: None, None
                      size: 130, 50
                      pos_hint: {'x':0.2,'y':.4}
          Button:
              text: &quot;Submit&quot;
              size_hint: (.5, .2)
              pos_hint: {&quot;x&quot;: 0.25}
              on_release: root.submit_text()
  </code></pre>