[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] AttributeError: 'module' object has no attribute

From: Mike Heese
Subject: Re: [Discuss-gnuradio] AttributeError: 'module' object has no attribute 'block_name'
Date: Thu, 19 Mar 2015 19:26:37 -0500


I hope I put this question into the correct location on the Mailing List. 

Thanks again for your rapid response!!

Mike H.

On Thu, Mar 19, 2015 at 7:24 PM, Mike Heese <address@hidden> wrote:

I sincerely apologize if I have posted this email to the wrong location but this is where the web page sent me.

I have forwarded my original email below and hope it shows up as you expected.

Any info you can provide on this problem would be greatly appreciated.

Mike Heese

Forwarded conversation
Subject: Re: [Discuss-gnuradio] AttributeError: 'module' object has no attribute 'block_name'

From: Mike Heese <address@hidden>
Date: Wed, Mar 18, 2015 at 10:07 PM
To: address@hidden


I am having the exact same issues as those discussed in this thread and have not found any solutions that work.  I apologize for the strange-ness of the email but we've been struggling with this problem for several days.

First, I have GNU Radio installed on three different Laptops each running 64-bit Ubuntu.  GNURadio was installed using the 'apt-get' install call for gnuradio with no other modifications.  The steps below will produce this exact problem on every machine we have tried it on.

Step 1. 
Pick any GNU Radio Tutorial such as the 'square2_ff' Tutorial.  Follow all the steps exactly as indicated to create the basic block.  Compile and install the block into GNURadio following the steps in the Tutorial.  Run the Block in GNURadio.  The Block should work in GNURadio exactly as indicated in the Tutorial.  Great Tutorial by the way!

Step 2.
Now, completely exit GNURadio.  Open the 'square2_ff_impl.cc' file (or whatever your implementation file is) and add (any) one of the C++ API Class Headers such as:

Next, in the constructor for square2_ff_impl add a single line to instantiate a filter object such as:
gr::filter::fir_filter_fff::sptr  filter(gr::filter::fir_filter_fff::make(1,m_taps));

Make sure the 'm_taps' vector does in fact hold values but don't do anything else here.  Just declare a variable of the C++ API Class you picked. Do not modify any other files than the .cc file.

Step 3.
Following this, compile the Block code and install the Block into GNURadio again following the exact same steps from the Tutorial as before.  The Test Steps on my machine do not indicate any errors here, which is adding to my confusions.

Step 4.
Open GNURadio and try running the 'square2_ff' (or whatever yours is called) Block again.
Now, with every machine I've tried this on, you will get the error:
AttributeError:'module' object has no attribute 'square2_ff'

Following this, exit GNURadio completely.

Step 5.
Open the source module 'square2_ff_impl.cc' file again and comment out only the line where you instantiated the 'filter' object.  Leave the #include for 'fir_filter_fff.h' alone.  Recompile and reinstall the Block back into GNURadio following the Tutorial steps as before.  Don't modify anything else other than the .cc file.

Step 6.
Open GNURadio again and try the square2_ff block again.  This time it works exactly as it should with no errors.

For some reason, the C++ OOT Blocks will not run inside GNU Radio if I try to use any of the C++ API Classes in the implementation code.  I've tried everything I can think to move the declarations/headers around but nothing works. Granted, I have not tried every single API Class but I've tried enough to know it doesn't work.  I do not touch any of the swig or python files or XML files.  The only file I touch is the implementation file and this is enough to cause this error.

What am I doing wrong here?  This problem is all over the internet but none of the solutions offered seem to work on any machine I try them on??

Any help on this would be greatly appreciated.

Mike H

From: Tom Rondeau <address@hidden>
Date: Thu, Mar 19, 2015 at 9:54 AM
To: Mike Heese <address@hidden>

Hi Mike,

I have the answer for you, but it's our policy not to answer these questions off the mailing list. Could you please post this to the ML, instead, and I can answer it there?

And I really appreciate the detail you went through to help me recreate and understand the issue.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]