Hi all,
today i was trying to make hierarchical signal processing block in
Python.
I started with gr_modtool script, and configured it for hierpython block
type.
My idea was to design block similar to packet framer, so inside of the
new
block, I connected binary slicer and Framer sink. I have also declared
message queue.
Outside of main block, I designed another block which should collect
messages sent by framer from the main block.
When I wanted to run this block, I got following error:
Traceback (most recent call last):
File “/home/savi_ne/work/gnuradio/GRC/top_block.py”, line 439, in
tb = top_block()
File “/home/savi_ne/work/gnuradio/GRC/top_block.py”, line 183, in
init
self.test_packet_proba_0 = test.packet_proba()
AttributeError: ‘module’ object has no attribute ‘packet_proba’
Next I found that maybe I have to put following line in init.py
file:
from packet_proba import *
After that I got similar error:
Traceback (most recent call last):
File “/home/savi_ne/work/gnuradio/GRC/top_block.py”, line 18, in
import test
File “/usr/local/lib64/python2.6/site-packages/test/init.py”, line
49, in
from packet_proba import *
File “/usr/local/lib64/python2.6/site-packages/test/packet_proba.py”,
line 51, in
class proba(gr.basic_block):
AttributeError: ‘module’ object has no attribute ‘basic_block’
I have also tried with gr.block instead of gr.basic_block, but with
identical results.
Can anybody tell what’s missing?
Thanks