KnugiHK / WhatsApp-Chat-Exporter

A customizable Android and iOS/iPadOS WhatsApp database parser that will give you the history of your WhatsApp conversations in HTML and JSON. Android Backup Crypt12, Crypt14, Crypt15, and new schema supported.
https://wts.knugi.dev/
MIT License
518 stars 76 forks source link

sqlite3.DatabaseError: database disk image is malformed #66

Closed yonka2019 closed 9 months ago

yonka2019 commented 9 months ago

another wa exporters works properly, why this throws this issue?

yonka2019 commented 9 months ago
wtsexporter_x64.exe -a
Gathering contacts...(446)
Traceback (most recent call last):649)
  File "C:\Users\yonka\AppData\Local\Temp\ONEFIL~3\__main__.py", line 287, in <module>
  File "C:\Users\yonka\AppData\Local\Temp\ONEFIL~3\__main__.py", line 240, in main
  File "C:\Users\yonka\AppData\Local\Temp\ONEFIL~3\Whatsapp_Chat_Exporter\extract.py", line 380, in messages
sqlite3.DatabaseError: database disk image is malformed
yonka2019 commented 9 months ago

what really strange, is that the DB Browser open the messages column in msgstore.db without any issues

KnugiHK commented 9 months ago

From what I understand, for now, it doesn't seem to be the problem of the exporter itself. I can't really tell why it would happen as I don't have your database file. But if you don't mind, you can send me the database for inspection.

In the meantime, you may try this. Just remember to do a backup for your database.

PS. Could you run the exporter with pip install (i.e., not using the binary)? That should give a more verbose traceback for debugging.

yonka2019 commented 9 months ago

i don't really know what changed, but i copied again the msgstore.db & wa.db from the root dir, and re-runned the script and it wroked. =/ ty for help