Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'exit' is not defined #107

Open
iconsofourtime opened this issue Jul 11, 2024 · 10 comments
Open

NameError: name 'exit' is not defined #107

iconsofourtime opened this issue Jul 11, 2024 · 10 comments
Labels
ios iOS exclusive issue

Comments

@iconsofourtime
Copy link

iconsofourtime commented Jul 11, 2024

Must have

  • WhatsApp version: 2.24.13.79
  • OS: iOS - 17.5.1
  • Platform: Windows
  • Branch and version: WhatsApp Chat Exporter: 0.10.0 - exe file downloaded today

If it is an error yield by Python, please also provide the trackback

PS C:\wabckp> .\wtsexporter_x64 -i -b "C:\Users\User1\Apple\MobileSync\Backup\00008110-001E490C0AEA901E"
Contact database not found.
Traceback (most recent call last):
  File "C:\Users\User1\AppData\Local\Temp\ONEFIL~1\__main__.py", line 519, in <module>
  File "C:\Users\User1\AppData\Local\Temp\ONEFIL~1\__main__.py", line 406, in main
  File "C:\Users\User1\AppData\Local\Temp\ONEFIL~1\Whatsapp_Chat_Exporter\ios_media_handler.py", line 99, in extract_media
NameError: name 'exit' is not defined

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

@iconsofourtime iconsofourtime changed the title [BUG] NameError: name 'exit' is not defined Jul 11, 2024
@KnugiHK
Copy link
Owner

KnugiHK commented Jul 12, 2024

Could you try to install the tool using pip?

@iconsofourtime
Copy link
Author

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
Copy link
Owner

KnugiHK commented Jul 13, 2024

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 #102.

@iconsofourtime
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

KnugiHK commented Jul 19, 2024

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
Copy link
Owner

KnugiHK commented Jul 20, 2024

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
Copy link
Author

OK, can I use different branch or wait?

@KnugiHK
Copy link
Owner

KnugiHK commented Jul 28, 2024

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

@KnugiHK
Copy link
Owner

KnugiHK commented Sep 11, 2024

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?

I could not reproduce the issue in iOS 17.6.1 with WhatsApp 2.24.17.78. It works fine with 0.10.0. Not sure what have been changed inside the WhatsApp app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ios iOS exclusive issue
Projects
None yet
Development

No branches or pull requests

2 participants