App crashes when data is loaded from TinyDB to listview

Hi,
I have written a simple app to register mood and save the data in phone. I have also a button to export data. Upon click the button a notifier pops up and asks for a file name but when I press that button I get following error:

Here is how the code look like:




List of Moods
You broke the list structure of global List Of Moods when you stored it back into TinyDB tag Data.

Remove that text JOIN,
and clear TinyDB to start with a fresh empty list.

Dear ABG,
Thank you for your respond. I need to export the data to a file. Clearing TinyDB will remove the data or may be I have misunderstood what you mean, Could you please show me with block?

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

HI Abraham!
Thank you.
Here comes the Aia file.
Mood.aia (3.5 MB)

I started to proceduralize your common code, to concentrate your mistakes in one area.
(I did not have time to finish it. You should see the pattern.)

I am unsure what image animation does for you.

I changed your download formating to semicolon delimitted table.
I hope you know how to import it.

You will probably regret your choice of time format when you go to graph and filter it.
That's another reason I centralized it in the procedure.


Mood (1).aia (3.5 MB)




I can't vouch for the /Download/ directory.
I haven't used file export destinations yet.

1 Like

HI Abraham,
Thank you for your message and example code. I have modified the rest of the app accordingly. Now it seems It is working. I dont get error while export.
Thank you.
//Hasse

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.