I have been trying to make an android app (via kivy launcher) that automatically makes a backup each time you save to a .db file.
When running kivy on my pc, the program works perfectly, but when I use it on my phone via kivy launcher, the program just crashes. Interestingly, the next time I go into the kivy launcher, the backup file appears in the directory it was supposed to be saved in.
I copy the .db file using shutil:
shutil.copy('test.db','BACKUP_'+self.time+'.db')
The last few errors suggest there is some problem with the shutil.copy() method I am using to copy the files, but I really don't understand why it is giving me the error. I think it might have to do with android having issue with the directory I want to save the backup to, or maybe some permission issues.
I am using shutil because it comes with the default python 3 library as far as I understand. I am also using the android kivy launcher because I haven't yet learned how to export a .apk file (I heard you need to use buildozer on linux or mac and I run windows).
I would appreciate it if anyone could give me advice on how I can copy the .db file as a backup on android using kivy launcher.