"Your library is currently empty"

Thanks to everyone in this thread sharing tips and ideas, and welcome to PhotoStructure, @jiangzhenjerry !

Actually, they’re super relevant. If you get a SqliteError: no such table error, it means something has gone terribly wrong with your library database.

PhotoStructure uses SQLite, and applies migrations on startup as needed to ensure the correct database schema is set up. You can read a bit more about this here: What's PS_FORCE_LOCAL_DB_REPLICA?

If a table is missing, I suspect something has truncated your .photostructure/models/db.sqlite3 file. This can happen if the library uses a volume with “transparent” SSD caching (UnRaid suffers from this): and I believe you can set up DSM 6 or later to use SSD caching as well.

PhotoStructure’s library database needs to be stored directly on a local disk (and use forceLocalDbReplica=false, or you need to set up a bind mount of /ps/tmp to be a local disk (and use forceLocalDbReplica=true).

Once you’ve got that set up, restarting PhotoStructure should be enough for it to realize the db is borked, and reset the schema.

This is as I would suspect: there are a couple issues with read-only volumes, but imports should still work.

Here are the issues:

  1. If PhotoStructure can’t extract a volume UUID, the URIs for that device will be simple file:// paths which will break if you move /images to a different path, or change the source bind mount to a different volume. Read more about that here:

(as that post states, you can add a .uuid file to the root of the bind mount yourself: cat /proc/sys/kernel/random/uuid > .uuid on the host machine into the bind mount for /images)

  1. Metadata changes (like fave and rotation) won’t be able to be written back to sidecars (or the original image), but will be stored in your PhotoStructure library.

If you’re still having issues, set your LOG_LEVEL=debug, restart your container, and then email me your logs so I can take a look. Details are here: PhotoStructure | What are in my logs and error reports?

Sorry for the hassle, and thanks for sticking with it!

1 Like