jfarley248 / iTunes_Backup_Reader

Python 3 Script to parse out iTunes backups
MIT License
172 stars 41 forks source link

ImportError: cannot import name 'KaitaiStruct' #7

Open omhmega opened 4 years ago

omhmega commented 4 years ago

This is a normal unencrypted backup with only -i -o and -v parameters. I get: ImportError: cannot import name 'KaitaiStruct'

Kaitaistruct package is present in iTBR root. Running Python 3.6.5

Traceback (most recent call last): File "C:\temp\iTunes_Backup_Reader-4.0\iTunes_Backup_Reader.py", line 18, in from helpers import plist_parser, recreator File "C:\temp\iTunes_Backup_Reader-4.0\helpers\recreator.py", line 17, in from helpers import decryptor File "C:\temp\iTunes_Backup_Reader-4.0\helpers\decryptor.py", line 17, in from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO ImportError: cannot import name 'KaitaiStruct'

jfarley248 commented 4 years ago

Looking into this now. Are you able to use the executable?

omhmega commented 4 years ago

Looking into this now. Are you able to use the executable?

Didn't try the exe. I used the previous version directly from Python just fine.

Great project, BTW. Thank you

omhmega commented 4 years ago

It seems that "from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO" is redundant as the kaitai lib is only referred to in the helpers/decryptor.py (code) and construct/core.py (comment) files. KaitaiStruct and KaitaiStream are not mentioned anywhere in the code (except the import line), and BytesIO is imported from the Python io library.