IdealChain / signal-media-exporter

A script to export media files from Signal Desktop.
GNU General Public License v3.0
31 stars 10 forks source link

malformed database #15

Closed IeP4nieF closed 1 year ago

IeP4nieF commented 1 year ago

Hi,

signal-media-exporter fails with Version 6.30.1 of signa-desktop:

$ python -m signal_media_exporter
2023-09-10 11:15:39 CRITICAL DatabaseError "malformed database schema (messages_on_insert_insert_mentions) - near ">>": syntax error" - please check the database and the sqlcipher parameters!
Exporting... |████████████████████████████████████████| 0 in 0.1s (0.00/s)
2023-09-10 11:15:40 ERROR No media messages found.
$ apt show signal-desktop
Package: signal-desktop
Version: 6.30.1
[...]

Perhaps there is a relation with this bugreport.

IdealChain commented 1 year ago

Thanks for the report!

I guess that version 0.4.5 of the sqlcipher3-binary package is too old and it's not compatible with modern sqlite JSON extraction features which Signal now relies on. Since that old version does not have an install candidate for Python 3.11, I've used the latest version 0.5.1 on Arch without problems. I was a bit lazy/careful with upgrading since there were so many old Python versions in use.

Which Python version do you have installed? Debian bookworm seems to include 3.11 too, finally.

Please try upgrading the package by running poetry add sqlcipher3-binary@latest to install 0.5.1 and then try again. If that works, I can update the poetry lockfile.

IeP4nieF commented 1 year ago

Yes, indeed. You are right. This is an older bullseye machine, which I can't update for now. As you suggested I ran poetry add sqlcipher3-binary@latest in the venv. After this signal-media-exporter runs fine again.

Thanks!