# Creating block using gr modtool.py

**URL:** <https://www.ruby-forum.com/t/creating-block-using-gr-modtool-py/236122>\
**Category:** GNU Radio\
**Created:** [August 7, 2013, 2:32am UTC](https://www.ruby-forum.com/t/creating-block-using-gr-modtool-py/236122 "2013-08-07T02:32:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [August 7, 2013, 2:32am UTC](https://www.ruby-forum.com/t/creating-block-using-gr-modtool-py/236122/1 "2013-08-07T02:32:57Z")

</div>

Hi,

I am working with gnuradio 3.3.0 and now trying to create new block  
using gr\_modtool.py.

I am able to do following :  
cmake  
make  
sudo make install  
sudo ldconfig

after editing header file of bin and lib with .cc file.

Then while using newly created block with GRC I got following error

def **init** (self, \*args, \*\*kwargs): raise AttributeError(“No  
constructor defined”) AttributeError: No constructor defined

Detail I have posted here. Is this error due to lower version of  
GNURadio, if not how can I solve this.

Please help me out.

Sent from Windows Mail

---

<div class="post-metadata">

**Author:** ![dilip\_thapa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/87869e/32.png) [@dilip\_thapa](https://www.ruby-forum.com/u/dilip_thapa)\
**Post date:** [August 7, 2013, 2:55am UTC](https://www.ruby-forum.com/t/creating-block-using-gr-modtool-py/236122/2 "2013-08-07T02:55:44Z")

</div>

Hi Dilip,

3.3.0 is an old version of gnuradio. The code you posted clearly  
contains GR 3.7 code structure;  
so you’re using an 3.7 gr\_modtool with an 3.3.0 GNU Radio; this can’t  
work.

Please use the gr\_modtool that comes with your GNU Radio version (there  
was no official gr\_modtool back in the 3.3.0  
days in the GR tree). It is not desirable to use such an old version of  
GR unless you _really_ need to support legacy code, therefore you should  
try to use GNU Radio 3.7; please install the latest versions using  
PyBOMBS ([http://gnuradio.org/redmine/projects/pybombs/wiki](http://gnuradio.org/redmine/projects/pybombs/wiki)) or  
build-gnuradio  
([http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR#Using-the-build-gnuradio-script](http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR#Using-the-build-gnuradio-script)).

Happy exploring,  
Marcus M.
