Jim,

I have attached a greatly simplified version of what I am trying to accomplish. 
I still get the same error. What am I doing wrong?

Jim

From: Jim Melton
Sent: Monday, August 28, 2023 12:01 PM
To: discuss-gnuradio@gnu.org
Subject: RE: Selector error - "IndexError: output_index must be < noutputs"

Don’t you need to instantiate “Receive”?



---

Jim Melton


Non-Sensitive



From: discuss-gnuradio-bounces+jim.melton=sncorp....@gnu.org 
<discuss-gnuradio-bounces+jim.melton=sncorp....@gnu.org> On Behalf Of Elmore's
Sent: Monday, August 28, 2023 09:15
To: discuss-gnuradio@gnu.org
Subject: [EXTERNAL] 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




CONFIDENTIALITY NOTICE - SNC EMAIL: This email and any attachments are 
confidential, may contain proprietary, protected, or export controlled 
information, and are intended for the use of the intended recipients only. Any 
review, reliance, distribution, disclosure, or forwarding of this email and/or 
attachments outside of Sierra Nevada Corporation (SNC) without express written 
approval of the sender, except to the extent required to further properly 
approved SNC business purposes, is strictly prohibited. If you are not the 
intended recipient of this email, please notify the sender immediately, and 
delete all copies without reading, printing, or saving in any manner. --- Thank 
You.


--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Attachment: Selector_epy_block_0.py
Description: Binary data

Attachment: Selector_Test.grc
Description: Binary data

Reply via email to