title: Kivy remove widget
body: <p>I'm having trouble removing a widgets with a label once it's added 
  Here's the relevant piece of code:</p>
  
  <pre><code>    logi= True
      if data == []:
  
          logn =Label(text= "Incorrect Username",color=(190,0,0,1),
                       pos_hint={"right":1.035,"top":1.14})
          self.add_widget(logn)
  
          logu =Label(text= "Incorrect Password",color=(190,0,0,1),
                  pos_hint={"right":1.035,"top":1.04})
          self.add_widget(logu)
  
          logi= False
  
      if logi == True:
  
          textinput.text=''
          textinput2.text=''
  
          if 'logn' in locals() and 'logu' in locals() :
              self.remove_widget(logn)   
              self.remove_widget(logu)
  </code></pre>
  
  <p>once the widgets have been added I can't seem to remove them, if i remove the <code>if 'logn' in locals() and 'logu' in locals() :</code>statement I get an error "Local variable referenced before assignment " every time I test this without the above mentioned if statment I make sure the widgets have been added</p>