title: Kivy change label text with python
body: <p>I'm semi-OK with Python but brand new to Kivy, I know my problem is referencing the label ID but I can't seem to solve it and searching doesn't seem to give me what I need.</p>
  
  <p>I'm trying to get a label to display the current time, so I know I have the right framework in terms of updating etc but I'm sure its all down to referencing the label ID somehow and its that I'm struggling with?</p>
  
  <p>The following code runs fine, displays the labels etc until I try to update the <code>label_text.text</code> at which point i get an error: <code>AttributeError: 'float' object has no attribute 'lbl_time'</code>. I've tried <code>str(time.strftime("%H:%M:%S"))</code> but that doesn't solve it.</p>
  
  <pre><code>from kivy.app import App
  from kivy.base import runTouchApp
  from kivy.lang import Builder
  from kivy.properties import ListProperty
  from kivy.uix.boxlayout import BoxLayout
  from kivy.properties import ObjectProperty
  from kivy.uix.screenmanager import ScreenManager, Screen, WipeTransition, FadeTransition
  from kivy.uix.anchorlayout import AnchorLayout
  from kivy.properties import ObjectProperty, StringProperty
  from kivy.clock import Clock
  import time
  from datetime import datetime
  
  class MainScreen(Screen):
  
  def update_time(self):
      lbl_time = ObjectProperty()
      MyTime = time.strftime("%H:%M:%S")
      self.lbl_time.text = MyTime
  
  class DetailScreen(Screen):
      pass
  
  class SettingsScreen(Screen):
      pass
  
  class MyScreenManager(ScreenManager):
      pass
  
  
  
  root_widget = Builder.load_string('''
      MyScreenManager:
      MainScreen:
      DetailScreen:
      SettingsScreen:
  
  &lt;MainScreen&gt;:
      name: 'main'
      BoxLayout:
          orientation: 'vertical'
          Label:
              id: lbl_time
              text: 'Time' 
              font_size: 60
          Label:
              text: 'Main2'
              font_size: 30
          GridLayout:
              cols: 2
              Label:
                  text: 'Bottom'
                  font_size: 30
              Label:
                  text: 'Bottom1'
                  font_size: 30
  
   &lt;DetailScreen&gt;:
       name: 'details'
  
   &lt;SettingsScreen&gt;:
       name: 'settings'
  
   ''')
   class ScreenManagerApp(App):
  
       def build(self):
           return root_widget
  
       def on_start(self):
           Clock.schedule_interval(MainScreen.update_time, 1)
  
   ScreenManagerApp().run()
  </code></pre>