question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No such table: messages (Edit: WhatsApp databases with "message" table are not supported)

See original GitHub issue

When running the script I get following error message

Gathering contacts...(97)
Traceback (most recent call last):
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\Scripts\wtsexporter.exe\__main__.py", line 7, in <module>
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\Whatsapp_Chat_Exporter\__main__.py", line 147, in main
    messages(db, data)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\Whatsapp_Chat_Exporter\extract.py", line 88, in messages
    c.execute("""SELECT count() FROM messages""")
sqlite3.OperationalError: no such table: messages

My database doesn’t contain the table messages, I only have one called message which contains the data but the schema of the table looks different from what it’s supposed to look like. 2022-02-14_22-28-04 What could be the issue here?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:36 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
KnugiHKcommented, Apr 6, 2022

I’ll try to reinstall WhatsApp and try it again, but it seems like the database scheme is changing. The new messages table has the following schema:

I can produce the same result on 2.22.7.73 and “messages” table no longer exist.

@Takepy As I can reproduce your situation now, I will work on supporting “message” table.

2reactions
KnugiHKcommented, Dec 23, 2022

__main__.py did not include from Whatsapp_Chat_Exporter import extract_new as extract. Replaced the files in \site-packages\Whatsapp_Chat_Exporter manually with the ones from the branch now and ran the script again. Now being faced with this

╰─ wtsexporter -a
Gathering contacts...(97)
Traceback (most recent call last):
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\Scripts\wtsexporter.exe\__main__.py", line 7, in <module>
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\Whatsapp_Chat_Exporter\__main__.py", line 184, in main
    messages(db, data)
  File "C:\Users\******\AppData\Local\Programs\Python\Python310\lib\site-packages\Whatsapp_Chat_Exporter\extract_new.py", line 206, in messages
    c.execute("""SELECT jid.raw_string as key_remote_jid,
sqlite3.OperationalError: no such column: message_media.media_caption

It should be fixed in the latest commit: https://github.com/KnugiHK/Whatsapp-Chat-Exporter/commit/d3892a4e4f4f0b533107f871a23de22153cc879a.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Two different errors: older version of WhatsApp Viewer and no ...
It seems like you tried to open an older WhatsApp database. Please try to use an older version of WhatsApp Viewer. So, I...
Read more >
[TOOL] Whatsapp Xtract: Backup Messages Extractor ...
Error: no such table: wa_contacts. I've copied a "msgstore.db" from a rooted android smartphone, and when I drag and drop the file in...
Read more >
New msgstore – Who 'Dis? A Look At An Updated WhatsApp ...
db from the public Android 12 image does have a table called message, but it contains no message content. The column name has...
Read more >
Android Room SQLite_ERROR no such table - Stack Overflow
Room creates the tables, as part of setting up and using AppDatabase . Where is your code that is attempting to access screen_items...
Read more >
whapa - Bountysource
how to encrypt decrypted msgstore.db back to crypt14. ... I've been getting the message since this week: "Error: no such table: messages"
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found