Odd path behaviour when importing JSON

Hello :slightly_smiling_face:
I’m having trouble with JSON imports again. I’ve set the project settings to use relative paths, but when I import my JSON file, Tropy can’t find the images. Looking into the SQLite database, I can see that the path says “…/…/data/images/photo.jpg”, whereas I’ve specified “data/images/photo.jpg”. When I manually remove the “…/…” that have snuck in, the photos appear.

Any thoughts on what might be happening here?

If I’m not mistaken the path in the JSON file has to be absolute or relative to the JSON file (not the Tropy project). So if your JSON file lives in data/images then the path would have to be photo.jpg.

Yes this is how I’ve always done it… I’ve tried starting over a few times, and now the (relative) paths look correct in the database, but the logs still say the images can’t be found.

I’ve now set absolute paths, which works just fine, but here’s another oddity: it works fine with the project settings set to “relative”… Is it possible my project settings aren’t updating?

The project settings specify how Tropy handles paths of imported images. This is independent of the paths in the JSON files. When you use the relative setting you can move a folder containing the project and the images around – but the absolute paths of the JSON files will be broken in this case when you try to re-import them.