waistline
waistline copied to clipboard
Database import failed
I want to delete (not archive) some foods.
I changed their name to DELETE
and exported the database.
I edited the exported database and removed the entries with "name":"DELETE"
and the rest of that stuff that follows for that entry.
But when I import that edited database I get:
Import failed
Are those items referenced anywhere else, in the diary for example?
Yes, but that's why I edited the exported diary file too and delete them in there, but I can not import the edited diary file again.
The most likely reason why you cannot import the backup file is because you made a mistake when editing it. You can paste the content of the file into an online json validator to check if it's still syntactically correct.
I'm not confusing anything, how do you come to this? In Issue 705 @davidhealey suggested that I should try importing the diary file as a database file. I know what I'm doing!
But you said that the diary export is not useful for humans because it only contains IDs. That's not true, so I assumed you were talking about the other file.
Anyway, the point is: If you make edits to the json file, you have to be careful not to mess up the syntax. Otherwise you won't be able to import the file again - which is exactly the issue you are having (i.e. the original topic of this issue).