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
517 stars 76 forks source link

Incomplete export #73

Open pimduin opened 7 months ago

pimduin commented 7 months ago

Hi,

I'm running into a problem where chats aren't fully exported. Text chats seem to be exported fine (also vcards), but all the media seems to be completely missing.


wtsexporter -i --preserve-timestamp -b ./backup_directory/
Encryption detected on the backup!
Enter the password for the backup:
Decrypting WhatsApp database...Done
Exception in thread Thread-1 (extract_files_by_domain):
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run() extracting files   
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
TypeError: EncryptedBackup.extract_files_by_domain() takes 3 positional arguments but 4 were given
All required files decrypted and extracted.
Processing contacts...(163)
Processing messages...(100762/100762)
Processing media...(20790/20790)
Processing vCards...(17/17)
Generating chats...(164/164)
Copying media directory...

Everything is done!```
KnugiHK commented 7 months ago

Hi. Could you check if lines 38 to 41 of extract_iphone_media.py is identical to the following?

    extract_thread = threading.Thread(
        target=backup.extract_files_by_domain,
        args=(identifiers.DOMAIN, identifiers.DOMAIN, bplist_reader)
    )
pimduin commented 7 months ago

I'm not that familiar with Python. Where can I find that file? (I'm on MacOS)

edit -- Never mind, I found it at: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/Whatsapp_Chat_Exporter/

I think I installed the dev branch. The lines 38 to 41 look identical:

    extract_thread = threading.Thread(
        target=backup.extract_files_by_domain,
        args=(identifiers.DOMAIN, identifiers.DOMAIN, bplist_reader)
    )
KnugiHK commented 7 months ago

I think I installed the dev branch. The lines 38 to 41 look identical:

    extract_thread = threading.Thread(
        target=backup.extract_files_by_domain,
        args=(identifiers.DOMAIN, identifiers.DOMAIN, bplist_reader)
    )

Strange. The args is indeed 3 arguments not 4.

pimduin commented 5 months ago

I've (finally) investigated a bit further. The problem was that I also needed your fork of iphone_backup_decrypt (https://github.com/KnugiHK/iphone_backup_decrypt)

Maybe I installed WhatsApp-Chat-Exporter wrongly, but it seems that the original iphone_backup_decrypt was installed as a dependency instead of your fork.

After installing the forked iphone_backup_decrypt everything seemed to work perfectly. Thanks!

KnugiHK commented 5 months ago

I've (finally) investigated a bit further. The problem was that I also needed your fork of iphone_backup_decrypt (https://github.com/KnugiHK/iphone_backup_decrypt)

Maybe I installed WhatsApp-Chat-Exporter wrongly, but it seems that the original iphone_backup_decrypt was installed as a dependency instead of your fork.

After installing the forked iphone_backup_decrypt everything seemed to work perfectly. Thanks!

Yes. I did not upload the fork to PyPi and one must install it through the repo. Glad it works for you!

KnugiHK commented 5 months ago

Btw, you shouldn't get the original iphone_backup_decrypt installed automatically, as I did not include that in the setup file.