Error while testing a new block

Hello!

I was learning how to make a block, using the “how to make a block
tutorial”, and when I develop a little block for tests, I got the error
message displayed below. The error occurred when i ran the python tests.

======================================================================
ERROR: test_001_quad_ff (main.qa_rtdsp)

Traceback (most recent call last):
File “./qa_rtdsp.py”, line 29, in setUp
self.fg = gr.flow_graph ()
AttributeError: ‘module’ object has no attribute ‘flow_graph’

======================================================================

Also, it isn’t clear for me exactly what files should I change to be
able
to compile the new block. If I make modifications only in the files
listed
on the tutorial, the make command indicate error in some other files.
So,
basically, I’m opening every file from the example and checking if they
have any references to the block I develop. Is this the correct
approach?
Do I have to change all those files?

On Fri, Nov 18, 2011 at 1:20 PM, Andr S. [email protected]
wrote:

File “./qa_rtdsp.py”, line 29, in setUp
Do I have to change all those files?


Andr F. B. Selva

What version are you running? The use of “flow_graph” has long been
dead.

Make sure you have the latest version of howto-write-a-block and
gnuradio (
http://gnuradio.org/redmine/projects/gnuradio/wiki/Download).

Tom

change flow_graph to top_block

On 11/18/2011 10:20 AM, Andr S. wrote:

File “./qa_rtdsp.py”, line 29, in setUp
self.fg = gr.flow_graph ()
AttributeError: ‘module’ object has no attribute ‘flow_graph’

That looks like the old API which was deprecated years ago. Its not
gr.top_block() Perhaps you should take a look at the latest howto.

My personal favorite howto:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-howto-write-a-block-cmake

-Josh