Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

libplist python binding doesn't work for plist.Structure.from_bin

#225

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.

Reported by Yin Dian · July 15th, 2011 @ 05:30 PM

State: resolved
Milestone: none
Assigned to: Nikias Bassen Nikias Bassen

Activity

  1. Glenn Washburn
    Glenn Washburn

    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.

    September 15th, 2011 @ 02:28 AM

  2. Nikias Bassen
    Nikias Bassen
    • 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

    September 26th, 2011 @ 03:46 PM

  3. Yin Dian
    Yin Dian

    Hello,

    The patch works but seems missing from the latest git master (9ed6e05b).

    November 9th, 2012 @ 02:12 AM

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.