Re: 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

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.comhttp://www.bosch.com

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]mailto:[email protected]

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

On Fri, Mar 20, 2015 at 12:42 PM, Ludwig Stephan (CR/AEH4) <
[email protected]> 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

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.comhttp://www.bosch.com

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]mailto:[email protected]

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: [email protected]omain.invalid
[mailto:[email protected]omain.invalid]
Im Auftrag von Ludwig Stephan (CR/AEH4)
Gesendet: Freitag, 20. Mrz 2015 17:43
An: [email protected]
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

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.comhttp://www.bosch.com

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]mailto:[email protected]

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

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.comhttp://www.bosch.com

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]mailto:[email protected]

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: [email protected] [mailto:[email protected]] Im Auftrag von
Tom R.
Gesendet: Freitag, 20. März 2015 17:58
An: Ludwig Stephan (CR/AEH4)
Cc: [email protected]
Betreff: Re: [Discuss-gnuradio] Fwd: AttributeError: ‘module’ object has
no attri

On Fri, Mar 20, 2015 at 12:42 PM, Ludwig Stephan (CR/AEH4)
<[email protected]mailto:[email protected]>
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

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.comhttp://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
[email protected]mailto:[email protected]

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

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