Error in creating block

Hi…
I crated a block named ‘costas_loop_cc’. but when I connect to test
this
block with NULL sink and NULL Source, shows the error like this:
Error 1:
Generating: “/home/lekha/top_block.py”
Executing: “/home/lekha/top_block.py”

File “/home/lekha/top_block.py”, line 31
self.costas_loop_cc_0 = -------->
^
SyntaxError: invalid syntax

Done

the part of the generated top_block.py code related to error is:
##################################################
# Blocks
##################################################
self.costas_loop_cc_0 = -------->line 31
cannot find ‘loop_bw’: digital.costas_loop_cc($loop_bw, $order)
<--------
self.blocks_null_source_0 =
blocks.null_source(gr.sizeof_gr_complex1)
self.blocks_null_sink_0 =
blocks.null_sink(gr.sizeof_gr_complex
1)

    ##################################################
    # Connections
    ##################################################
    self.connect((self.blocks_null_source_0, 0),

(self.costas_loop_cc_0, 0))
self.connect((self.costas_loop_cc_0, 0),
(self.blocks_null_sink_0,
0))

I wish it is a small error but I couldn’t get. while creating a block
when
I execute gr_modtool makexml command it shows the error :

AttributeError: ‘NoneType’ object has no attribute ‘group’.

what does it mean AttributeError? Is there any relation with this to
above
mentioned error. thanks for your advice

Hi Vishwanatha,

the generated python is bogus; the “------>line31…<------” should not
be there. This indicates that there is something wrong with your GRC XML
file, most probably the python command in the tag is
failing. Reading the line “cannot find ‘loop_bw’:
digital.costas_loop_cc($loop_bw, $order)”,
I’d assume that you meant to use loop_bw as a parameter to your block’s
constructor/make function, but maybe forgot to define it somewhere else
(or you’ve got a typo).

Greetings,
Marcus

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs