Tuesday, September 21, 2021

Re: Error when opening flowgraph unless a specific unused block is enabled

It's an error in grc. The block 'Modulate vector' is not proper
evaluated. Just open and close the block 'Modulate vector' in the
property editor then you get the error message :


Value "digital.modulate_vector_bc(mod.to_basic_block(), data, taps)"
cannot be evaluated:
'NoneType' object has no attribute 'to_basic_block'


I think there is an error in the digital_modulate_vector.block.yml
definition.
Probably line 16 in this file

value: ${ digital.modulate_vector_bc(mod.to_basic_block(), data, taps) }

should be removed.

-- Volker
Am 20.09.21 um 21:54 schrieb Jameson Collins:
> I am trying  to make my own version of packet_rx.grc.  I copied the
> flowgraph and began modifying it.  I found that at some point  I started
> getting this error when I open the flowgraph:
>
> ERROR:gnuradio.grc.core.FlowGraph:Failed to evaluate variable block
> modulated_sync_word
> Traceback (most recent call last):
>   File
> "/home/user/git/toolbox/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/grc/core/FlowGraph.py",
> line 268, in renew_namespace
>     value = eval(variable_block.value, namespace, variable_block.namespace)
>   File "<string>", line 1, in <module>
> AttributeError: 'NoneType' object has no attribute 'to_basic_block'
> ERROR:gnuradio.grc.core.FlowGraph:Failed to evaluate variable block
> modulated_sync_word
> Traceback (most recent call last):
>   File
> "/home/user/git/toolbox/conda/miniforge3/envs/gnuradio/lib/python3.8/site-packages/gnuradio/grc/core/FlowGraph.py",
> line 268, in renew_namespace
>     value = eval(variable_block.value, namespace, variable_block.namespace)
>   File "<string>", line 1, in <module>
> AttributeError: 'NoneType' object has no attribute 'to_basic_block'
>
> I traced the problem back to whether or not the preamble variables are
> enabled in the flowgraph.  However, it doesn't matter whether these
> variables are actually used anywhere.  They simply need to exist
> otherwise this error occurs.
>
> Please see the attached grc file.  It has the minimum number of blocks
> to reproduce the error.  If the 3 disabled blocks are instead enabled
> then the error will not occur.

No comments:

Post a Comment