libplist python binding doesn't work for plist.Structure.from_bin
Reported by Yin Dian | July 15th, 2011 @ 05:30 PM
TypeError: in method 'Structure_from_bin', argument 1 of type
'std::vector< char > const &'
will be raised for the following code:
import plist
s = open('somefile.plist', 'rb').read()
plist.Structure.from_bin(s)
Maybe this is because PList::Structure::FromBin expects argument of type const std::vector&, to which Python string or list of char / int could not be converted. This problem has been found in both version 1.4 and 1.6 in my test.
Comments and changes to this ticket
-
Glenn Washburn September 15th, 2011 @ 02:28 AM
I've attached a fix for this based on version 1.4. The patch is very small and fairly self explanatory. I've got a ppa on launchpad with the fix at ppa:crass/ppa.
-
Nikias Bassen September 26th, 2011 @ 03:46 PM
- State changed from new to resolved
- Tag set to libplist python swig
- Assigned user set to Nikias Bassen
Hi,
@Glenn: I just committed your patch into the git repository. It will be available with the next release (which is not too far away).
Regards
Nikias -
Yin Dian November 9th, 2012 @ 02:12 AM
Hello,
The patch works but seems missing from the latest git master (9ed6e05b).
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org