Nice catch! That should be easy to fix.
The issue is registered here: SQL logic error during database Repair · Issue #5489 · duplicati/duplicati · GitHub
Fix is here: Fixed an incorrect string quote by kenkendk · Pull Request #5583 · duplicati/duplicati · GitHub
It looks like the error message is attempting to include some information that cannot be serialized.
I have a fix here Force serialize exception data before emitting JSON by kenkendk · Pull Request #5584 · duplicati/duplicati · GitHub
I think this may have been answered already, but this indicates that you are indeed running an old version of Duplicati. There is a max-db-version inside each binary and it matches the largest known database version. When it starts, it upgrades the database to that version, and a downgrade would then trigger this message.
I cannot fully follow how you get into this state, but at least be aware that you are running an old Duplicati and at some point you have been running a newer.
That sounds like you have managed to connect with an older version, which (on Windows) would use RC4 encryption on the database. This feature was removed from SQLite since, so canary builds use a field-level encryption as @ts678 mentions.