-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I've extracted bplist data from a sqlite row of data from iTunes backup. When I try to parse it like this: BPListReader.plistWithString(bplist_str)
I get this error:
python2.7/site-packages/bplist/bplist.py", line 147, in __unpackItem
obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
TypeError: unsupported operand type(s) for &: 'str' and 'int'
Did a little inspecting in pdb:
(Pdb) !type(obj_header)
<type 'str'>
(Pdb) !len(obj_header)
1
(Pdb) !obj_header
'\xd4'
(Pdb) !obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
*** TypeError: unsupported operand type(s) for &: 'str' and 'int'
I rather not share the bplist data since I don't what personal data is in it but If I save the bplist data to a file and preview in finder, it's able to parse the data:
with open('/temp/blist-test.plist', 'w') as f:
f.write(bplist_str)
Metadata
Metadata
Assignees
Labels
No labels
