You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread_body_wrapper :error: ERROR thread[thread-per-block[0]: <block EPB: File Source to Tagged Stream(3)>]: TypeError: '>' not supported between instances of 'gnuradio.gr.gr_python.work_return_t' and 'int'
At:
/dcs/lib/python3.10/site-packages/gnuradio/gr/gateway.py(303): consume_items
/dcs/lib/python3.10/site-packages/gnuradio/gr/gateway.py(200): handle_general_work
System Information
Any
GNU Radio Version
3.11-git (main)
Specific Version
No response
Steps to Reproduce the Problem
Return gr.WORK_DONE from a Python block.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
@mormj Any clue why returning -1 from an EPB does not terminate the flowgraph, or print the "we're done" message in block_executor.cc? Is this a PyBind11 inheritance problem? I can't see how it all fits together.
@ryanvolz It looks like you might be familiar with this area too.
It turns out that GUI flowgraphs don't shut down (the graphics at least) on DONE. This has nothing to do with Python. Returning -1 from a EPB does shut down a non-GUI flowgraph as expected.
marcusmueller
changed the title
Python Gateway: work return code enums do not match return type of general_work
GUI FGs: returning WORK_DONE doesn't shut down the FG
Feb 14, 2024
importnumpyasnpfromgnuradioimportgrclassblk(gr.sync_block): # other base classes are basic_block, decim_block, interp_blockdef__init__(self): # only default arguments heregr.sync_block.__init__(
self,
name='instant return -1 block', # will show up in GRCin_sig=[np.complex64],
out_sig=[]
)
defwork(self, input_items, output_items):
return-1
What happened?
Returning -1 from work() in a Python Embedded Block does not terminate the flowgraph. Possibly something wrong with the PyBind11 inheritance tree?
The enums here
gnuradio/gnuradio-runtime/python/gnuradio/gr/bindings/block_python.cc
Line 493 in 04d4f0d
(based on)
gnuradio/gnuradio-runtime/include/gnuradio/block.h
Line 66 in 04d4f0d
Can not be returned here
gnuradio/gnuradio-runtime/python/gnuradio/gr/bindings/block_gateway.h
Line 96 in 04d4f0d
Error:
System Information
Any
GNU Radio Version
3.11-git (main)
Specific Version
No response
Steps to Reproduce the Problem
Return
gr.WORK_DONE
from a Python block.Relevant log output
No response
The text was updated successfully, but these errors were encountered: