0

I am attempting my first Android app, using Python3, kivy and Buildozer. All sees to go well, the program runs n Python and the Androd app launches. However, when the method below is called (by the click of a button) on the Android the app closes. Probably something completely obvious, but my novice eyes can't see it. I'd be grateful if someone can point me in the right way. (Sorry to post so much script - but I can't figure what is causing the problem).

def popup (self, *args):
  self.findings = []
  with open("./patterns/list.txt", "r") as f :
    for l in iter(f) :
      if len(self.t.text) > 0 :
        if self.t.text in l :
          l = l.rstrip('\n')
          t = tuple(l.split(','))
          self.findings.append( t )

  self.pop = Popup(title='Search Results = ' + str(len(self.findings)))
  b2 = BoxLayout(orientation='vertical')
  car = Carousel(direction='right', loop=True)
  but3 = Button(text='Close', font_size=50, size_hint_y=None, height=80)
  b2.add_widget(car)
  b2.add_widget(but3)
  self.pop.add_widget(b2)
  but3.bind(on_release=self.close)

  for i in self.findings :
    image = Image(source="./patterns/"+i[0]+".png")
    car.add_widget(image)

  self.pop.open()
rms9
  • 35
  • 3
  • 1
    Read `adb logcat` and try debugging it yourself. If the log doesn't tell you anything, then ask here for help. – jligeza Apr 17 '16 at 15:36
  • Good advice - I learned from the exercise. But it is giving an IOError No such file. I put the APK file on the SD card and the text file on the relative path in the script. I have seen http://stackoverflow.com/questions/29911991/android-kivy-where-to-put-application-files-ini-images-db-etc?rq=1 which deal with the same problem. – rms9 Apr 26 '16 at 19:00

0 Answers0