# Re: Fwd: AttributeError: 'module' object has no attri

**URL:** <https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675>\
**Category:** GNU Radio\
**Created:** [March 20, 2015, 5:44pm UTC](https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675 "2015-03-20T17:44:27Z")\
**Posts on this page:** 4\
**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:** [March 20, 2015, 5:44pm UTC](https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675/1 "2015-03-20T17:44:27Z")

</div>

Hi Tom,

I have a similar problem. I added a pretty plain block, which uses  
#include \<gnuradio/blocks/pdu.h\> and changed my set() according to your  
description to  
set(GR\_REQUIRED\_COMPONENTS RUNTIME BLOCKS PMT PDU)

All compiles well, but the same error as in this thread.

Do you have a clue, what I am missing?

Regards  
Stephan

> When you build an OOT module, it only knows to look for and link against the GNU  
> Radio runtime library. If you look in the top-level CMakeLists.txt file of your  
> project, you’ll  
> see a line (somewhere around line 113) that declares this:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME)

> But now you are trying to use an FFT filter, which is in the GNU Radio filter  
> library (libgnuradio-filter). You need to tell the project to both find and link  
> against this library now,  
> so change that line to:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME FILTER)

> For future reference, nearly this exact problem is mentioned in out OOT  
> configuration tutorial:

> [http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig)

> Tom

Mit freundlichen Gren / Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY  
[www.bosch.com](http://www.bosch.com)[http://www.bosch.com](http://www.bosch.com)

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kbel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller

---

<div class="post-metadata">

**Author:** ![Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e36b37/32.png) [@Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/u/Ludwig_Stephan_SCR)\
**Post date:** [March 20, 2015, 6:00pm UTC](https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675/2 "2015-03-20T18:00:20Z")

</div>

On Fri, Mar 20, 2015 at 12:42 PM, Ludwig Stephan (CR/AEH4) \<  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

> Regards  
> Stephan

I haven’t a clue. I just tried it and it worked fine.

To the impl.cc file, I added:

#include \<gnuradio/blocks/pdu.h\>  
…  
gr::blocks::pdu::vector\_type i = gr::blocks::pdu::float\_t;  
size\_t t = gr::blocks::pdu::itemsize(i);

And then I added BLOCKS to the GR\_REQUIRED\_COMPONENTS and it worked  
fine.  
Without the cmake changes, I get the same error, but otherwise, it  
worked  
as expected here.

Tom

---

<div class="post-metadata">

**Author:** ![Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e36b37/32.png) [@Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/u/Ludwig_Stephan_SCR)\
**Post date:** [March 20, 2015, 5:48pm UTC](https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675/3 "2015-03-20T17:48:53Z")

</div>

I forgot to say, that this is a tagged\_stream block. I take accept pdu  
messages with pmt::blob payload and convert to a tagged stream of char  
(similar to pdu\_to\_tagged\_stream block)

Mit freundlichen Gren / Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY  
[www.bosch.com](http://www.bosch.com)[http://www.bosch.com](http://www.bosch.com)

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kbel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller  
Von: [discuss-gnuradio-bounces+stephan.ludwig2=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+stephan.ludwig2=removed_email_address@domain.invalid)  
[[mailto:discuss-gnuradio-bounces+stephan.ludwig2=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+stephan.ludwig2=removed_email_address@domain.invalid)]  
Im Auftrag von Ludwig Stephan (CR/AEH4)  
Gesendet: Freitag, 20. Mrz 2015 17:43  
An: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Betreff: Re: [Discuss-gnuradio] Fwd: AttributeError: ‘module’ object has  
no attri

Hi Tom,

I have a similar problem. I added a pretty plain block, which uses  
#include \<gnuradio/blocks/pdu.h\> and changed my set() according to your  
description to  
set(GR\_REQUIRED\_COMPONENTS RUNTIME BLOCKS PMT PDU)

All compiles well, but the same error as in this thread.

Do you have a clue, what I am missing?

Regards  
Stephan

> When you build an OOT module, it only knows to look for and link against the GNU  
> Radio runtime library. If you look in the top-level CMakeLists.txt file of your  
> project, you’ll  
> see a line (somewhere around line 113) that declares this:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME)

> But now you are trying to use an FFT filter, which is in the GNU Radio filter  
> library (libgnuradio-filter). You need to tell the project to both find and link  
> against this library now,  
> so change that line to:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME FILTER)

> For future reference, nearly this exact problem is mentioned in out OOT  
> configuration tutorial:

> [http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig)

> Tom

Mit freundlichen Gren / Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY  
[www.bosch.com](http://www.bosch.com)[http://www.bosch.com](http://www.bosch.com)

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kbel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller

---

<div class="post-metadata">

**Author:** ![Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e36b37/32.png) [@Ludwig\_Stephan\_SCR](https://www.ruby-forum.com/u/Ludwig_Stephan_SCR)\
**Post date:** [March 23, 2015, 10:31am UTC](https://www.ruby-forum.com/t/re-fwd-attributeerror-module-object-has-no-attri/234675/4 "2015-03-23T10:31:54Z")

</div>

Thanks Tom for your immediate response. I re-created the blocks in my  
module and copied sources over from tagged\_stream\_to\_pdu, which works  
not.  
I cannot reproduce the described error anymore, which means the issue is  
solved for me. The diff between old and new code does not show any  
differences but the old block name was tagged\_stream2pdu.

Nevertheless, thanks for your help..

Mit freundlichen Grüßen / Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY  
[www.bosch.com](http://www.bosch.com)[http://www.bosch.com](http://www.bosch.com)

Tel. +49(711)811-8809  
Fax +49(711)811-1052  
Mobile +49(172)5630639  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kübel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller  
Von: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] Im Auftrag von  
Tom R.  
Gesendet: Freitag, 20. März 2015 17:58  
An: Ludwig Stephan (CR/AEH4)  
Cc: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Betreff: Re: [Discuss-gnuradio] Fwd: AttributeError: ‘module’ object has  
no attri

On Fri, Mar 20, 2015 at 12:42 PM, Ludwig Stephan (CR/AEH4)  
\<[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\>  
wrote:  
Hi Tom,

I have a similar problem. I added a pretty plain block, which uses  
#include \<gnuradio/blocks/pdu.h\> and changed my set() according to your  
description to  
set(GR\_REQUIRED\_COMPONENTS RUNTIME BLOCKS PMT PDU)

All compiles well, but the same error as in this thread.

Do you have a clue, what I am missing?

Regards  
Stephan

I haven’t a clue. I just tried it and it worked fine.

To the impl.cc file, I added:

#include \<gnuradio/blocks/pdu.h\>  
…  
gr::blocks::pdu::vector\_type i = gr::blocks::pdu::float\_t;  
size\_t t = gr::blocks::pdu::itemsize(i);

And then I added BLOCKS to the GR\_REQUIRED\_COMPONENTS and it worked  
fine. Without the cmake changes, I get the same error, but otherwise, it  
worked as expected here.

Tom

> When you build an OOT module, it only knows to look for and link against the GNU  
> Radio runtime library. If you look in the top-level CMakeLists.txt file of your  
> project, you’ll  
> see a line (somewhere around line 113) that declares this:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME)

> But now you are trying to use an FFT filter, which is in the GNU Radio filter  
> library (libgnuradio-filter). You need to tell the project to both find and link  
> against this library now,  
> so change that line to:

> set(GR\_REQUIRED\_COMPONENTS RUNTIME FILTER)

> For future reference, nearly this exact problem is mentioned in out OOT  
> configuration tutorial:

> [http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig)

> Tom

Mit freundlichen Grüßen / Best regards

Stephan Ludwig

Robert Bosch GmbH  
Corporate Sector Research & Advance Engineering, Communication  
Technology (CR/AEH4)  
Renningen  
70465 Stuttgart  
GERMANY  
[www.bosch.com](http://www.bosch.com)[http://www.bosch.com](http://www.bosch.com)

Tel. +49(711)811-8809tel:%2B49(711)811-8809  
Fax +49(711)811-1052tel:%2B49(711)811-1052  
Mobile +49(172)5630639tel:%2B49(172)5630639  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,  
HRB 14000;  
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:  
Dr. Volkmar Denner,  
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.  
Dirk Hoheisel, Christoph Kübel,  
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller
