Re: [Pyobjc-dev] QTKit with Python 2.6.4 and Snow Leopard?
Brought to you by:
ronaldoussoren
|
From: Jep H. <je...@gm...> - 2010-02-02 14:02:20
|
Hi Ronald,
You actually already solved this when you pointed out that the 'in_attrs' string wasn't being properly defined as an NS dictionary. Once you do that, it all works....
def convert_for_iphone(infile, outfile):
in_attrs = NSDictionary.dictionaryWithDictionary_({
'QTMovieFileNameAttribute': infile,
'QTMovieOpenAsyncOKAttribute': False,
'QTMovieApertureModeAttribute': QTMovieApertureModeClean,
'QTMovieIsActiveAttribute': True,
})
movie, error = QTMovie.movieWithAttributes_error_(in_attrs, None)
Cheers,
Jep
On Feb 2, 2010, at 3:28 AM, Ronald Oussoren wrote:
>
> On 10 Jan, 2010, at 23:31, Jep Hill wrote:
>
>> Hello all,
>>
>> Having searched the web high and low trying to find help with QTKit and Python on Snow Leopard 10.6.2,I was very happy to find this forum.
>>
>> Can anyone tell my how to get this sample script working: http://pseudogreen.org/blog/qtkit/
>>
>> I'm pulling my hair out trying to figure out why I keep getting this error:
>>
>>
>> $convert_for_iphone in_test.mov out_test.mov
>> Traceback (most recent call last):
>> File "/Users/jep/scripts/python/convert_for_iphone", line 49, in <module>
>> convert_for_iphone(infile, outfile)
>> File "/Users/jep/scripts/python/convert_for_iphone", line 27, in convert_for_iphone
>> movie, error = QTKit.QTMovie.movieWithAttributes_error_(in_attrs, None)
>> KeyError: u'QTMovieDelegateAttribute'
>>
>> In fact I'm getting the same "Key Error: u'QTMovieDelegateAttribute" on several example scripts. I can't seem to successfully initialize a movie object.
>>
>> All help is more than appreciated — thank you all.
>
> I get the same error message. My guess is that something changed in 10.6 that invalidated the script.
>
> Ronald
>
>>
>> Jep
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Pyobjc-dev mailing list
>> Pyo...@li...
>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
|