Cannot add an additional parameter to custom block

Hi all,

I got my things working, up to the point where I decided that an
additional parameter in my custom block would be very helpful. But for
some reason, GRC keeps holding on to my previous version of the block
with 3 parameters instead of my new one with 4 parameters. In the end,
after numerous fails, I did the following:

  • I deleted the existing block from my module using “gr_modtool rm
    MY_BLOCK”
  • I deleted the build folder
  • I added MY_BLOCK again using gr_modtool and filled in some additional
    C++ code
  • I changed the XML file to reflect the additional parameter
  • I deleted various files from /user/…, such that ‘sudo make install’
    did not report files already up-to-date: everything was newly installed

In GRC the custom block shows the additional parameter (a bool, with
options ‘On’ or ‘Off’), but when trying to run GRC it reports:

“TypeError: Required argument ‘XXX’ (pos 4) not found”.

It boils down to top_block.py, where I see a call to my block with only
3 parameters while in all files I can see, 4 parameters are defined. If
I delete this file, it is of course regenerated with the same error.
Somewhere a file resides which still has the previous definition of the
block with only 3 parameters instead of the new one with 4 parameters
and GRC relies on that.

Any ideas how to solve this are very welcome :slight_smile:

 Jeroen

Hi Jeroen,

On 01/21/2014 01:57 PM, [email protected] wrote:

  • I changed the XML file to reflect the additional parameter

…

It boils down to top_block.py, where I see a call to my block with
only 3 parameters while in all files I can see, 4 parameters are
defined.

Sounds like you haven’t updated the template in “…” (in
your blocks’ XML description).

If that doesn’t help, could you maybe post the XML?

Sebastian

–
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Sebastian Koslowski
Research Associate

Kaiserstrae 12
Building 05.01
76131 Karlsruhe, Germany

Phone: +49 721 608-46275
Fax: +49 721 608-46071
Email: [email protected]
Web: http://www.cel.kit.edu/

KIT University of the State of Baden-Wuerttemberg and National
Research Center of the Helmholtz Association

Koslowski, Sebastian (CEL) schreef op 2014-01-21 15:16:

Sounds like you haven’t updated the template in “…” (in
your blocks’ XML description).

If that doesn’t help, could you maybe post the XML?

Sebastian

How could I be so stupid to overlook that line, spent nearly 3 hours on
this… In my first attempt I apparently only added the additional

, and in further attempts (newly generated block) I also copied the erroneous line into the new xml-file.
   :-|

Anyway, you saved my day, it works again. Thanks!