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
553 stars 81 forks source link

NameError: name 'exit' is not defined #107

Open iconsofourtime opened 1 month ago

iconsofourtime commented 1 month ago

Must have

Powershell on Windows 10 Pro , iphone backup made with Apple Devices and later also with iTunes. Both on Windows. Does not work on both.

KnugiHK commented 1 month ago

Could you try to install the tool using pip?

iconsofourtime commented 1 month ago

Sure.

PS C:\wabckp> python --version
Python 3.12.4

PS C:\wabckp> wtsexporter -i -b "C:\Users\User1\Apple\MobileSync\Backup\00008110-001E490C0AEA901E"
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\wtsexporter.exe\__main__.py", line 4, in <module>
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\Whatsapp_Chat_Exporter\__main__.py", line 11, in <module>
    from Whatsapp_Chat_Exporter import ios_handler, ios_media_handler
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\Whatsapp_Chat_Exporter\ios_media_handler.py", line 12, in <module>
    from iphone_backup_decrypt import FailedToDecryptError
ImportError: cannot import name 'FailedToDecryptError' from 'iphone_backup_decrypt' (C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\iphone_backup_decrypt\__init__.py)
KnugiHK commented 1 month ago

Sure.

PS C:\wabckp> python --version
Python 3.12.4

PS C:\wabckp> wtsexporter -i -b "C:\Users\User1\Apple\MobileSync\Backup\00008110-001E490C0AEA901E"
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\wtsexporter.exe\__main__.py", line 4, in <module>
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\Whatsapp_Chat_Exporter\__main__.py", line 11, in <module>
    from Whatsapp_Chat_Exporter import ios_handler, ios_media_handler
  File "C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\Whatsapp_Chat_Exporter\ios_media_handler.py", line 12, in <module>
    from iphone_backup_decrypt import FailedToDecryptError
ImportError: cannot import name 'FailedToDecryptError' from 'iphone_backup_decrypt' (C:\Users\User1\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\iphone_backup_decrypt\__init__.py)

Make sure you are installing the iphone_backup_decrypt with the master branch. For details of your issue, see https://github.com/KnugiHK/WhatsApp-Chat-Exporter/issues/102.

iconsofourtime commented 1 month ago

If you are working on unencrypted iOS/iPadOS backup, skip this

I did not istall it because my iPhone backup is not encrypted.

Do I need to install it anyway?

iconsofourtime commented 1 month ago

I installed iphone_backup_decrypt using: pip install git+https://github.com/KnugiHK/iphone_backup_decrypt command and this is what's happening now: PS C:\wabckp> wtsexporter -i -b "C:\Users\User1\Apple\MobileSync\Backup\00008110-001E490C0AEA901E" Contact database not found. PS C:\wabckp> No errors, just that one line information about contact database and still no chat history export..

What should I do next?

KnugiHK commented 1 month ago

If you are working on unencrypted iOS/iPadOS backup, skip this

I did not istall it because my iPhone backup is not encrypted.

Do I need to install it anyway?

Oh... Then it seems there could be issue in the code. I will take a look later.

KnugiHK commented 1 month ago

I installed iphone_backup_decrypt using: pip install git+https://github.com/KnugiHK/iphone_backup_decrypt command and this is what's happening now: PS C:\wabckp> wtsexporter -i -b "C:\Users\User1\Apple\MobileSync\Backup\00008110-001E490C0AEA901E" Contact database not found. PS C:\wabckp> No errors, just that one line information about contact database and still no chat history export..

What should I do next?

If you are sure you have WhatsApp (not WhatsApp Business) installed and exported it in the backup, then, probably they changed the database name, which requires changes to the code.

iconsofourtime commented 1 month ago

OK, can I use different branch or wait?

KnugiHK commented 4 weeks ago

Probably you will have to wait until I (or someone else who are willing to contribute) figure out the new things.