I sincerely apologize if I have posted this email to the wrong location
this is where the web page sent me.
I have forwarded my original email below and hope it shows up as you
Any info you can provide on this problem would be greatly appreciated.
Subject: Re: [Discuss-gnuradio] AttributeError: ‘module’ object has no
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
of the email but we’ve been struggling with this problem for several
First, I have GNU Radio 184.108.40.206 installed on three different Laptops
running 64-bit Ubuntu. GNURadio was installed using the ‘apt-get’
call for gnuradio with no other modifications. The steps below will
produce this exact problem on every machine we have tried it on.
Pick any GNU Radio Tutorial such as the ‘square2_ff’ Tutorial. Follow
the steps exactly as indicated to create the basic block. Compile and
install the block into GNURadio following the steps in the Tutorial.
the Block in GNURadio. The Block should work in GNURadio exactly as
indicated in the Tutorial. Great Tutorial by the way!
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:
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.
Following this, compile the Block code and install the Block into
again following the exact same steps from the Tutorial as before. The
Steps on my machine do not indicate any errors here, which is adding to
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.
Open the source module ‘square2_ff_impl.cc’ file again and comment out
the line where you instantiated the ‘filter’ object. Leave the #include
for ‘fir_filter_fff.h’ alone. Recompile and reinstall the Block back
GNURadio following the Tutorial steps as before. Don’t modify anything
else other than the .cc file.
Open GNURadio again and try the square2_ff block again. This time it
exactly as it should with no errors.
For some reason, the C++ OOT Blocks will not run inside GNU Radio if I
to use any of the C++ API Classes in the implementation code. I’ve
everything I can think to move the declarations/headers around but
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
files or XML files. The only file I touch is the implementation file
this is enough to cause this error.
What am I doing wrong here? This problem is all over the internet but
of the solutions offered seem to work on any machine I try them on??
Any help on this would be greatly appreciated.
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
understand the issue.