title: Refreshing Kivy Image with Python
body: <p>I have a weather app I've written in Python/Kivy, it successfully downloads and loads the image at application start but the weather map changes daily and its not refreshing. The Kivy documentation discusses <code>nocache: True</code>,  <code>image.reload()</code> &amp; I've tried <code>self.the_24h_chart.source.reload()</code> and both error.</p>
  
  <p>How can I reload an image file? Pseudo code:</p>
  
  <ol>
  <li>download new image and overwrite original with same name</li>
  <li>reload the image</li>
  </ol>
  
  <p>My current Kivy code:</p>
  
  <pre><code>#! /usr/bin/env python 
  # -*- decoding: utf-8 -*-
  from kivy.app import App
  from kivy.lang import Builder
  from kivy.uix.screenmanager import ScreenManager, Screen
  from kivy.properties import ObjectProperty, StringProperty, ListProperty
  from kivy.clock import Clock
  from kivy.loader import Loader
  import time
  from datetime import datetime, timedelta
  import socket
  import urllib
  
  
  
  
  #--------------- kivy code ------------------
  Builder.load_string('''
  
  &lt;Chart1&gt;:
      name: 'chart1'
      the_24h_chart: _chart_img
  
      Image:
          source: 'images/chart.jpg'
          nocache: True
          id: _chart_img
          size_hint_y: None
          height: dp(420)
   ''')
  #-------------------------------------------
  
  
  class Chart1(Screen):
  
      def update_chart1(self, sec):
        try:
          urllib.urlretrieve('http://wxcharts.eu/charts/gfs/uk/06/overview_030.jpg', 'images/chart.jpg')
          self.the_24h_chart.source = 'images/chart.jpg'
          self.Image.reload()
        except:
          print 'Error Updating Image'
          pass
  
  
  class ScreenManagerApp(App):
  
      def build(self):
          sm = ScreenManager()
          self.chart1_screen = Chart1(name = 'chart1')
          sm.add_widget(self.chart1_screen)
          return sm
  
  
      def on_start(self):
          event1 = Clock.create_trigger(self.chart1_screen.update_chart1)
          Clock.schedule_interval(self.chart1_screen.update_chart1, 3600) # 1 Hour
          event1()
  
  #===========================================================
  # run the App !
  ScreenManagerApp().run()
  </code></pre>