[Pythonmac-SIG] Argument is a block, but no signature available

Ronald Oussoren ronaldoussoren at mac.com
Mon Apr 2 04:10:56 EDT 2018



> On 16 Mar 2018, at 20:39, Ben Byram-Wigfield <ben.bw at me.com> wrote:
> 
> I’m trying to use a Completion Handler block as an argument for a Cocoa AVMIDIPlayer method:
> 
> midiPlayer = AVMIDIPlayer.alloc().initWithContentsOfURL_soundBankURL_error_(midiFile, None, None)
> midiPlayer.prepareToPlay()
> midiPlayer.play_(myCompletionHandler)
> 
> But I get:
> 
> Argument 2 is a block, but no signature available
> 
> From what I can find out, this points to a bit in the metadata of PyObjC that needs a bit of work. Is that the case?

That’s correct.

> 
> I’m using the default version 2.5.1 bundled with MacOS.

That’s your problem, 2.5 is ancient and unmaintained.  I’ve checked the metadata for PyObjC 4.2 (released yesterday) and that has metadata for this API.

Ronald



More information about the Pythonmac-SIG mailing list