# AttributeError: 'module' object has no attribute "BLOCK NAME"

**URL:** <https://www.ruby-forum.com/t/attributeerror-module-object-has-no-attribute-block-name/231269>\
**Category:** GNU Radio\
**Created:** [July 31, 2014, 10:55am UTC](https://www.ruby-forum.com/t/attributeerror-module-object-has-no-attribute-block-name/231269 "2014-07-31T10:55:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 31, 2014, 10:55am UTC](https://www.ruby-forum.com/t/attributeerror-module-object-has-no-attribute-block-name/231269/1 "2014-07-31T10:55:28Z")

</div>

Hi at all,  
I have some problem in running simulation of a block on gnuradio.  
I have developed a simple block, .cc, .h, .i and .xml file attouched  
here.  
All code is compile with success cmake/make/make install/ldconfig  
but when I place the block in gnuradio, running the simulation I get

Traceback (most recent call last):  
File “/home/simone/Scrivania/top\_block.py”, line 155, in   
tb = top\_block()  
File “/home/simone/Scrivania/top\_block.py”, line 106, in **init**  
self.agcs\_newblock\_0 = agcs.newblock()  
AttributeError: ‘module’ object has no attribute ‘newblock’

Who is related this error?  
Have I bad configured some file?

Thanks in advance,  
Simone Ciccia

---

<div class="post-metadata">

**Author:** ![Simone\_Ciccia\_S2106](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e495f1/32.png) [@Simone\_Ciccia\_S2106](https://www.ruby-forum.com/u/Simone_Ciccia_S2106)\
**Post date:** [August 2, 2014, 10:52pm UTC](https://www.ruby-forum.com/t/attributeerror-module-object-has-no-attribute-block-name/231269/2 "2014-08-02T22:52:43Z")

</div>

On Thu, Jul 31, 2014 at 4:54 AM, Simone Ciccia S210664 \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> ```
> self.agcs_newblock_0 = agcs.newblock()
> 
> ```
> 
> AttributeError: ‘module’ object has no attribute ‘newblock’
> 
> Who is related this error?  
> Have I bad configured some file?
> 
> Thanks in advance,  
> Simone Ciccia

Were you using gr\_modtool for this? That will help ensure that  
everything  
is added to the build system to be installed correctly.

Otherwise, it’s possible that you’ve installed it into a different  
prefix  
than GNU Radio and haven’t told GNU Radio where the new blocks are  
supposed  
to be, such as by setting PYTHONPATH.

Tom
