discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problem with OOT module import


From: Richard Bell
Subject: Re: [Discuss-gnuradio] Problem with OOT module import
Date: Thu, 10 Sep 2015 13:27:11 -0700

I figured out what part of the problem was. I added a few OOT blocks (gr_modtool add block1, block2, etc..) to my module and wrote the code for one of them, with the other two in default gr_modtool created states. I wanted to compile and test each one at a time, so I thought I could just comment out the other ones in CMakeLists.txt like this:

list(APPEND my_block_sources
    #my_block_source1_impl.cc
    my_block_source2_impl.cc <-- only this gets compiled
)

You cannot do this. Once I uncommented the other blocks in the CMakeLists.txt file, the block I was testing runs in grc. However, I still cannot run my qa python code for the block without the import error related to swig. I cd to the python folder of my OOT module and do the following

>> python qa_my_block.py

Traceback (most recent call last):
  File "qa_my_block.py", line 24, in <module>
    import my_block_swig as my_block
ImportError: No module named my_block_swig


I've tried removing the build directory and recreating it. No luck. Any suggestions?

Thanks,
Rich

On Thu, Sep 10, 2015 at 11:38 AM, Richard Bell <address@hidden> wrote:
Sorry, I'm using Ubuntu 14.04 LTS.

On Thu, Sep 10, 2015 at 11:26 AM, Michael Dickens <address@hidden> wrote:
What OS are you building on?
 
On Thu, Sep 10, 2015, at 02:18 PM, Richard Bell wrote:
I wrote an OOT module in cpp using GNU Radio 3.7.8, it shows up in GRC but when I run it, I get the worst error known to mankind (in my opinion):
 
AttributeError: 'module' object has no attribute 'my_block'
 
I've done this enough to where that usually means I've forgotten to execute sudo ldconfig or have an xml error. This time however, I'm not finding either of those to be a problem. So I tried to test the block using a python qa test. When I execute the qa test from command line, I get:
 
Traceback (most recent call last):
  File "qa_my_block.py", line 24, in <module>
    import my_block_swig as my_block
ImportError: No module named MIL_STD_188_181C_swig
 
I'm not sure how or why swig is having issues. Does anyone know what problem this points to and a possible solution?

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio




reply via email to

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