Monday, August 28, 2023

Selector error - "IndexError: output_index must be < noutputs"

I am attempting to use a Selector block with 2 outputs. I want to select the output programmatically. When I run the flowgraph, I get the subject error.
 
The following is my abbreviated code which is pertinent to the question interspersed with explanatory comments:
 

import Receive Receive is a Hier Block which I import in to my Python file

blocks_selector_0 = Receive.blocks.selector(gr.sizeof_float*1,0,0) Instantiation of blocks_selector_0. The Selector block is in the Receive Hier Block.

 
blocks_selector_0.set_output_index(0) I am trying to select the 0 output. This is where the error occurs.
 
0 is certainly less than 2 so what is happening?
 
Jim



Virus-free.www.avg.com

No comments:

Post a Comment