discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] AttributeError: 'module' object has no attribute 'squ


From: Aydin Tarik Zengin
Subject: [Discuss-gnuradio] AttributeError: 'module' object has no attribute 'square3_ff'
Date: Tue, 29 Oct 2013 16:43:53 +0200

Hello Everyone,

I'm getting an error while adding a new block to grc version 3.7.2git-110-gb8b9bff2.
I followed the tutorial at http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules

Also had to modify at some points as below.
- in the test code it worked when I changed ;

from gnuradio import gr, gr_unittest into from gnuradio import gr, gr_unittest, blocks

gr.vector_source_f(src_data) into blocks.vector_source_f(src_data)

gr.vector_sink_f() into gr.vector_sink_f()

All the tests pass too.
100% tests passed, 0 tests failed out of 2

I added 3 blocks using c++ for first 2 and python for the last as explained in the tutorial.
I can see the blocks in the grc block list and can add them into the sketch.
It generates the python code without any error.
But the generated python code cannot be run and giving the error below:

Traceback (most recent call last):
  File "top_block.py", line 82, in <module>
    tb = top_block()
  File "top_block.py", line 48, in __init__
    self.test_square3_ff_0 = test.square3_ff()
AttributeError: 'module' object has no attribute 'square3_ff'

You can see the generated file from http://pastebin.com/nE4SFn8Y

test module is placed under /usr/lib/python2.7/site-packages/test
gnuradio is under /usr/lib/python2.7/site-packages/gnuradio

Is there any point in the tutorial that does not match with the current version of gnuradio?

Thanks in advance

Tarik

___________________________________

Aydin Tarik Zengin

reply via email to

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