Journal File Created Automatically

I am hoping you can identify what I am doing wrong or the setting I have altered that created the following file. Recently after closing my Tropy project a “journal” file has been created along with the original project file. Everything is working great, but I am concerned this file will become a problem. can you advise? Thanks!

No need for concern: the journal file is a temporary SQLite file that is created at the start of a database transaction (it’s required for rollback in case of errors). Normally, the file should be deleted at the end of a transaction: that is, while using Tropy this file will show up and disappear repeatedly.

The only time the file should stick around is if Tropy crashes in the middle of a transaction – at this moment the project database might be corrupted and Tropy will use the journal file to repair the database the next time the project is opened.

Thanks for the reply, I really appreciate it.

I figured it had to do with error checking the database. However, my instance of Tropy is creating this file each and every time it is opened and closed. Does this mean my data is somehow corrupted? It takes a moment each and every time to close Tropy where the software pauses before closing.

I am well over 50 hours of working with a library approaching 10,000 items, so I am a bit paranoid. I back up the .tpy file each time I leave the program, but want to make sure I am doing what is best for my data. Is there anything else I can do?

Thanks for your help, I really appreciate it.

Yes, the file will be created every time you open Tropy (because Tropy will write to the database), so the existence of the file is no reason for concern. However, it should not remain there on disk after Tropy has shutdown (if that’s the case we should investigate further).

Before shutdown, Tropy will run some maintenance code on the project database and this will definitely take longer as the project gets bigger, however it should not become excessively long (i.e., longer than a couple of seconds). We’ll have to optimize the code for large projects further if that happens, so it’s great if could you let us know.

The .tpy is a SQLite database file so it is relatively safe (i.e., your data can be extracted from the file using free open source tools), but, yes, please keep backups if the data is important!

I understand the backup necessity, and keep a running folder of backup files going back to the creation of the project, so I should have a tremendous amount of restore points.

Closing the Tropy project takes consistently 10 seconds. I don’t mind at all, but thought perhaps that would be helpful to tell you.

The project file named “TPY-JOURNAL File” has never removed itself automatically. I should say, though, that the Tropy project is saved in a OneDrive folder, which consistently syncs with the cloud. It is one more measure of backup. Could that be the reason it is not disappearing? I would be willing to take any steps of investigation you have in mind - mostly to help the development of Tropy. As long as my data is safe, I don’t mind the file staying there.

Could you try copying your project to a different folder (outside of OneDrive) and open and close the project there to see if the journal sticks around in that case?

10 seconds is too long for my taste; it might actually mean that some timeouts are triggered, which, in turn, might interrupt a transaction there at the end and explain why the journal file sticks around). If you could open and close Tropy with your project and then copy and upload the project.log file here that might help us debug.

Sorry about the delay.

I attempted to copy the file and move it somewhere else. I actually used my desktop computer, as the file extensions for the images are the same. When I open it in another location, I saw a long list of “Consolidation” of photos in the progress bar in the lower left hand corner. The photos were generating fine, and then all the sudden it stopping, providing the error message “Database is locked.”

As I said, I have a tremendous amount of backups of my work (copies of the .tpy file) going back to when I started the project, but I am growing concerned something is wrong. I have exported all of the files to JSON except the one I am finishing right now, which is a large one (approximately 4,700 items and counting - it will probably grow to about 6,000 beforefinishing).

Can you suggest where I might find the “project.log” file? I used the command under help to “Show Log Files,” which takes me to the local AppData folder on my machine. I see a “log” folder with a “project” text file, but I don’t believe that is the same thing. Can you help me locate it?

Thanks very much.

The project log file should be located in log/project.log in Tropy’s user data folder (in AppData on Windows); I’m guessing Explorer did not show the file extension, so the project text file (it contains JSON) is likely the right one. It is important to know that the log resets when you start Tropy, so ideally you would close Tropy first (waiting the 10 seconds it takes) and only then copy the log file.

If you’d be willing to share the project file with me, I could take a look at it myself (we don’t have a lot of experience with projects of that size yet, so it would be certainly helpful to us) – if that’s OK for you, you could send me the link via private message (I’d only need the project file, not the photos of course).

Have you tried opening the file again on the desktop computer after the ‘database is locked’ error?