[Top][All Lists]

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

Re: [Discuss-gnuradio] "ImportError: No module named myblock" when gener

From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] "ImportError: No module named myblock" when generating py file in GRC
Date: Thu, 21 Apr 2011 23:21:10 -0400

On Thu, Apr 21, 2011 at 10:29 PM, Yulong Yang <address@hidden> wrote:

I try to add all it needs to put my custom block into this module. I add
the corresponding .xml/.cc/.h/.i files into grc/lib/swig folder
separately and modify MakeFile.am files in each folders. However, it
still cannot work. When generating top_block.py in GRC, the console
       self.myblock_amplifier_ff_0 = myblock.amplifier_ff(1)
       AttributeError: 'module' object has no attribute 'amplifier_ff'

My block is a simple amplifier with a parameter "Gain". My module is
"myblock" generated with the out-of-tree-project command. I tried the
square_ff block before and it works well in GRC. What does this error
exactly mean?

Thank you.

It's very likely that you have missed something in the Makefile somewhere. There are a lot of steps here, and since you can import myblock, you've gotten that far. It's just missing the actual block inside of the module. Make sure you really have added everything you need to in the Makefiles in grc, lib, and swig directories and that all of the .i files are accounted for.


reply via email to

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