"Error: SQLITE_CORRUPT: database disk image is malformed",

Hi !
I tried to open my project on tropy but it won’t open and I get this message :

{“msg”:“SQLITE_CORRUPT: database disk image is malformed”,“stack”:“Error: SQLITE_CORRUPT: database disk image is malformed”,“system”:“Windows_NT 10.0.19045 (x64)”,“time”:1715096397268,“version”:“1.16.2”}

What does it mean ?

Thank you

Does this happen every time you start Tropy or only for a specific project? In the latter case it means that your project database file has been damaged. In our experience this is related to an issue with backup/synced folders like OneDrive or similar services. Usually, it’s possible to restore the project file, but I can’t make any promises. If you share the tpy file with us (you can send a link here as a direct message), we’ll try to restore the database for you.

Only for a specific project. It makes sense because when I try to open it, it seems like Onedrive tries to delete the file on its own.
Thank you!

project.tpy (972 KB)

Is this what you mean ?

Projet de mémoire 2 .tropy

Yes, that’s it. Unfortunately the file is very badly damaged. We can restore it but there is a lot of data in there that would need to be re-associated by hand. For reference, I see around 573 items and 650 photos in the restored data. There are around 1,300 metadata values but around 1,000 of them are not associated correctly. I believe we could restore most of those I believe but it will take some effort. Do you have a backup of the file or is there a backup that OneDrive could restore? If there is a backup copy, this would certainly be the better alternative.

Oh I see. Thank you for looking into it. I’m not sure what you mean by a backup. Where would I be able to find it and is this something I was supposed to have done ? I’m not sure I did that … Also, what could have caused it ?

It’s difficult to say what exactly happened, but I’m assuming that OneDrive altered the file at the same time as Tropy was saving changes to it or something along those lines. Tropy uses SQLite to access the project file, which is known to be extremely robust, but it is not safe for other processes to alter the file at the same time.

OneDrive and similar backup solutions often keep a file history or a record of conflicted version if they detect sync conflicts. If you have enabled version history for your files, you might be able to restore a previous version by selecting the project file and consulting its history.