Testing portable project files

We have started rolling out beta builds for Tropy 1.3. While this version mostly adds metadata auto-completion and many internal updates to Tropy’s platform, we have also enabled experimental support for portable projects. Portable projects will remain experimental for a while, because they are only the first step towards more managed projects (think: projects where Tropy keeps copies of your photos and which support collaboration / access from multiple devices) and we’ll be experimenting with different settings and configuration options to make sure different project types are easy to understand and use. In the meantime, we know that there is a high demand for more portable projects, so we decided to start to make them available starting with the 1.3 release.

Please note, that there are going to be additional options available, but initially we define a portable project as a project that stores the paths to your photos relative to the project file. This means that you are still in control over where your photos are stored and you will be able to move your project file and photos together (e.g., to a new computer) and Tropy will be able to open such projects and display all photos without having to make any changes to the paths. This allows you to share projects more easily: e.g., you can put your photos and project file into a zipped folder and share it with others; you can also put your project on a shared folder like Dropbox or Google Drive and access your project from different computers. Please further note, however, that you cannot access the same project simultaneously this way (i.e., live collaboration won’t work) – be careful and make frequent backups if you intend to use a portable project this way!

For a portable project, it is best if you keep all your photos in a common folder (it is OK to have sub-folders, but you need a common root folder) together with your project file. To create a portable project from scratch:

  1. Create a folder for your project
  2. Start Tropy
  3. Enable developer mode in Tropy’s preferences
  4. Create a new project (save the project into the folder you created in step 1)
  5. In the new project select Developer -> Rebase project from the menu
  6. Move your photos to the folder created in step 1 (sub folders are OK)
  7. Import the photos into your project

That’s it. You can move the folder with your project file and photos around on your computer and you can send them to a different computer and open it there. You can also put the folder into a shared folder and open it from different computers, but as mentioned earlier, please be careful, because the project will not automatically merge if you open them multiple times: the last version to be saved will always win out.

If you have an existing project where all the photos already have a common root folder, you can make the project portable this way:

  1. Make a backup copy of your project in case something goes wrong!
  2. Move the project file to the common root folder of your photos
  3. Open the project in Tropy
  4. Enable developer mode in the preferences
  5. In your project select Developer -> Rebase project from the menu. This will automatically update the paths in your project to be relative to the current location of your project file.

If you open a portable project, here is how you can turn it back into a normal project using absolute paths:

  1. Open the project
  2. Make sure the photos can be viewed in the image viewer
  3. Select ‘Rebase project’ from the Developer menu; this will tell Tropy to store your absolute paths to your photos again.

As mentioned, these will be available starting with Tropy 1.3 (currently in beta, will become a stable release shortly I hope). If you have any questions, please just post them below. Happy hacking!

5 Likes

Here are two handy commands you can use from the command line to check the status of your project:

sqlite3 project.tpy "select base from project;"
#-> this should be "null" for default projects, and "project" for portable projects

sqlite3 project.tpy "select path from photos;"
#-> this prints out all the photo paths in your project; for portable projects the paths should be relative to your project base
3 Likes

Just did this for some previous Tropy work and it was smooth sailing – thanks! Off to Mali tomorrow and we’ll be using this thread’s instructions to make sure that any processing that I/we do in the field is portable in the future.

1 Like

Dear all,

I’m terrible at this, sorry, but I tried to open my.tpi project of years and years of comics on a computer that I recently got at work and it only imports the file name: COMICS. Could someone please help me with this? I have all my pictures in Google Drive as well but it would mean reimporting them and putting them again in folders of years, volumes, issues, per photo I had notes and tags.

Thank you for helping me
Eva

I’m happy to help. Before I can give you more detailed instructions, I would need some additional information: After moving your project to the new computer, do you still want to be able to work on it on the old computer? If so, you will have to ensure that both the project and the photos are always available on both computers (e.g., you could put both in Google Drive).

Could you also tell me where your photos are currently located in Google Drive?

Could you remind me of your emailadress, because I don’t want to share my research material on the world wide web, thank you very much

Hello! I have a problem that (I think) is related to the above. I am relatively new to Tropy, and I have been reading past posts. My apologies if I missed an answer elsewhere…

I am trying to use a portable project via OneDrive for Business via my university. I have a research assistant on a PC (I am unsure what version of Windows). I have a desktop with Windows 10 Enterprise, and a laptop with Windows 10 Home. My RA created a project file in the folder holding subfolders. I have copied that into the root folder, after reading the instructions above. I have also tried to follow the instructions in the Oct. 12 post, to rebase the project. However, the only thing I have succeeded in doing so far is to individually consolidate photos. The issues (as with other, older posts) appears to be differences in the file paths. Even those we are all in One Drive, the file paths appear to start with each user’s information. I understand that there is additional development work under way on these issues. Is there anything that I can feasibly do now?

Many thanks for your help!

Tom

Hi Tom!

The setup you describe should work with the current version of Tropy (though portable projects are still experimental). The important thing is that you have a single folder containing your project file and all the photos (in sub-folders if you prefer). If I understand correctly, you have that already so my guess is that project is currently not in ‘portable’ mode. The UI for this is still severely lacking, the way it works is: the ‘Rebase project’ command currently toggles the use of relative paths on or off with not much feedback either way. So you may just have to select ‘Rebase project’ one more time. The best way to know for sure would be to query the project file directly using the SQLite command I posted above. If this sounds too complicated, I’m happy to help if you upload your project file here or send it to me with a private message (or to sylvester.keil@gmail.com).

Finally, please keep in mind that, at this time, a portable project can be moved around easily, but it is not yet safe to open it simultaneously on multiple devices. At the moment, it is comparable to storing, for example a Word document in a shared folder: if you open it on multiple devices at the same time, whoever saves the file last, will overwrite the version saved previously. The same thing can happen with your Tropy project if you work on it from multiple devices, so please be cautious when working with your setup.

Hi,
When I enter the first command you suggest to check the status of my project, my command prompt returns: “‘sqlite3’ is not recognized as an internal or external command, operable program or batch file.” Do I need to be in a particular directory for this to work?
Thank you for your help in advance!
Monique

Update: I was able to make the move to a shared environment work, so I no longer need an answer to this question.

SQLite is pre-installed on macOS and typically on Linux. On Windows you would need to install SQLite for the command to be available.

I followed the procedure you describe for an existing project and it seems to work for the moment, except for one thing: on my laptop, where I created and worked so far on the project, all is working as usual; while on my desktop, where I can now see my project (that I moved to a OneDrive folder synchronised across the devices), I could not see all the metadata as it didn’t seem to have transferred the specific template I created. Pictures appeared only with the standard metadata template.

So I did the following: I ‘exported’ the template from the ‘original’ version on my laptop (in Tropy’s preferences I selected my template, clicked on export, saved the file), and I ‘imported’ the template to Tropy on my desktop (again going to Tropy’s preferences, clicked on import, selected the .ttp file containing my template). All the metadata reappeared, and seems to work properly.

So just wanted to ask: is my fix correct? I’m asking as I did it intuitively but wouldn’t like to find myself in a difficult situation in a few days :slight_smile:

Yes, you did the right thing!

My apologies for not mentioning this sooner, but as you noticed templates and vocabularies are not stored in your project file but elsewhere in your local Tropy ‘installation’ – this is because you might want to share templates across different projects. Therefore, if you work on the same project on different devices you should also install the templates you use on both of them. Hopefully templates won’t change frequently so that it is not too much work to keep them in sync (you could make it a habit to export the template after every change and keep it next to your project file on OneDrive). We’re currently working to set up a central template repository with which Tropy can sync its templates, so sharing templates will become easier in the future.

1 Like

Good news then, I’m relieved :wink:

So this means that any future change I may make to the template (as you say it shouldn’t be often, but just to be sure), will be stored locally?

If it is stored locally, would it be possible to move the folder containing all this type of information that Tropy uses to the same folder where the main Tropy project file is, so that it is synchronised as well across devices?

Tropy stores your vocabs and templates in an ontology.db file in your user data folder (Help -> Show User-Data Folder); this folder contains lots of settings of your local Tropy installation (such as recently opened projects, the position of the window on your screen, the size of various widgets and your preferences etc.). In theory it would be possible to move this entire folder to your OneDrive and start Tropy, but I would strongly urge against doing because of potential sync conflicts.

So, for the time being, you really need to export your template in order to use it on your other computer.

1 Like

OK, thanks.

In the meantime another question came up: when I open Tropy on my desktop (so the version where I had to import my specific template), just at the opening I got two error message today:

The first shows the file’s path and says ‘ResourceRequest timed out’. And the second is:

I clicked on OK in both cases, it disappeared, and then everything loaded just fine. I sense it’s because of the size of information to load, but wanted to see what you think.

Yes, this error indicates that Tropy reached a timeout while loading the project initially. This may happen if you have a large project (when this happens, it means that we need to further optimize the queries for large projects); it may also happen if there is a timeout/delay in reading from the project file: OneDrive does download your file before usage, right? Another reason for this might be that the hard disk on this computer is slower (e.g., if you use a SSD on your other device but not here) – this would explain why the issue appeared now.

It may have been something unrelated to Tropy too, but if you get timeouts consistently on this computer, could you tell us your hardware configuration and, roughly, how large your project is (or even share the project file with us) in terms of number of items, photos, notes (you can see those numbers by selecting all the items in your project, e.g. with Cmd+A in the item table)? Thanks!

Yes, OneDrive downloads the file before usage. I think the main reason is indeed the difference in hardware + the size of the project: I get the problem on an iMac with a classic hard disk; I got no issue on a recent MacBook Pro with SSD as you hinted at…

The project is very large, it is the one I was mentioning in another topic about the number of photos that Tropy could work with. I have passed the mark of 10K but should still be under 20K now. Happy to share my project file, can you remind me your email address?

OK, yes, if you could share a copy of your project with me (e.g. at sylvester.keil@gmail.com), we can use it for testing. That would be much appreciated!

As I recently updated the template on my laptop, and wanted to export it to my desktop version, I followed the exact same procedure as above (export, save, import) but it doesn’t work. I got the following error message:

34

What happened?

Just delete the old version of your template first, then import the new one and it should work. We should eventually replace this error message by a confirmation dialog – right now we err on the side of caution and do not overwrite the existing template.

1 Like