AttributeError: 'module' object has no attribute 'block_name'

Hello all,

I’ve just created a block called “sliding_fft”. The _impl.h file looks
like:

#include <gnuradio/fft/fft.h>

namespace gr {
namespace lte_dl_rx {

class sliding_fft_impl : public sliding_fft
{
 private:
    fft::fft_complex *d_fft;
    uint d_fft_size;
    uint count;

 public:
  sliding_fft_impl(uint fft_size);
  ~sliding_fft_impl();

  // Where all the action really happens
  int work(int noutput_items,
   gr_vector_const_void_star &input_items,
   gr_vector_void_star &output_items);
};

} // namespace lte_dl_rx
} // namespace gr

and the _impl.cc looks like:

/*

 * The private constructor

 */

sliding_fft_impl::sliding_fft_impl(uint fft_size)

  : gr::sync_block("sliding_fft",

          gr::io_signature::make(1, 1, sizeof(gr_complex)),

          gr::io_signature::make(1, 1, 

fft_size*sizeof(gr_complex))),

    d_fft_size(fft_size),

    count(1)

{

    d_fft = new fft::fft_complex (fft_size, 1, 1);

    set_history(fft_size);

}

There is no attribute problem till I don’t use the “d_fft = new
fft::fft_complex (fft_size, 1, 1);” line in the constructor!

After working a lot, I got the attribute error in grc is due to this
line!

Please help me why this is happening ?

Thank you kindly,

Mostafa

Hi all,

Even I am getting the same problem with that line in a different
scenario. What is going wrong here?

Thanks,
Joseph