|
From: | Patrick Sathyanathan |
Subject: | Re: [Discuss-gnuradio] OOT Module Attribute Error module object has no attribute 'blockname' |
Date: | Fri, 21 Aug 2015 14:37:55 -0700 |
I see the following in the output of "nm -C -u": U gr::ACK::Text_Sanitize_impl::forecast(int, std::vector<int, std::allocator<int> >&) This was the undefined symbol that was causing the module import to fail... as you have discovered yourself. Now that the module import has succeeded you are seeing a different error. This error is because of the following in the generated python file: self.ACK_Text_Sanitize_0 = ACK.Text_Sanitize() Note that this will invoke "Text_Sanitize::make" which expects a "char * message" argument. That causes the error message below. For some reason GRC is not adding that parameter in the above statement. Did you add a declaration for that parameter in the XML file ? To verify that the XML file is the issue just try editing the generated python file and changing the above to: self.ACK_Text_Sanitize_0 = ACK.Text_Sanitize("some string") and running it from the command line (run "python top_block.py" in a terminal window). --Patrick Date: Thu, 20 Aug 2015 11:08:56 -0500 From: address@hidden To: address@hidden Subject: Re: [Discuss-gnuradio] OOT Module Attribute Error module object has no attribute 'blockname' Nathan and Patrick, Thanks for the tips!https://gist.github.com/loganwashbourne under the same file name. I checked it against the gr-tutorial swig file and the only difference was that the ACK_swig.i file included a magic2 function call for each of my OOT blocks(check and Text_Sanitize), while the gr-tutorial didn't. Traceback (most recent call last): File "/home/comm1/Logan/Thesis/top_block.py", line 92, in <module> tb = top_block() File "/home/comm1/Logan/Thesis/top_block.py", line 65, in __init__ self.ACK_Text_Sanitize_0 = ACK.Text_Sanitize() File "/usr/local/lib/python2.7/dist-packages/ACK/ACK_swig.py", line 399, in make return _ACK_swig.Text_Sanitize_make(*args, **kwargs) TypeError: Required argument 'message' (pos 1) not found Logan Washbourne Electrical Engineering Graduate StudentOn Wed, Aug 19, 2015 at 5:06 PM, Patrick Sathyanathan <address@hidden> wrote:
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
[Prev in Thread] | Current Thread | [Next in Thread] |