"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.

I looked into it but all versions seems to be the same « restored » version with around 650 photos. Would it be at all possible to restore it ?

I’d recommend using the restored previous version from Google Drive, but we can restore the damaged version for you to compare.

Here is the restored database file:

project.tpy (460 KB)

This file should open fine. It contains 650 photos in 573 items. Many of the metadata strings could not be re-associated automatically and are missing in this file. I checked the list of strings and it looks like all of them are dates and titles based on the file names (that is no data that was entered manually).

How can we make sure things like this don’t occur? I can’t seem to get OneDrive to sync between two windows devices without some issue like this occurring. I keep the whole folder backed up so I’ve been able to restore, but I keep losing my most recent changes. What is the proper way to use Tropy with OneDrive?

Thank you for the restored version. I was able to open it. It doesnt contain everything like before but it is something. I don’t have a previous version in Google drive though. When it happened, all versions everywhere cant be opened.
Just to make sure, is there no way to access the previous full version again ? I’m finishing up my master’s thesis (I was using tropy for it) and I would just like to know if I should just give up on that or still wait for it. If not, I’ll try to find another solution to sort my pictures out.

Thank you for your help, it’s really appreciated.

You can try to restore a previously saved version in your Google Drive – you most likely want to do this in the web interface, not on your local device.