discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] hier_blocks2 error


From: bob wole
Subject: Re: [Discuss-gnuradio] hier_blocks2 error
Date: Mon, 17 Aug 2015 15:18:19 +0500



On 08/13/2015 08:38 AM, bob wole wrote:
> I am using gnruadio 3.7.8. I have a module (python) which is working
> well for version 3.6.3. In made necessary changes so that it can work
> with gnuradio 3.7.8. However I am getting following error
>
>   File
> "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py",
> line 92, in __getattr__
>     return getattr(self._impl, name)
> AttributeError: 'hier_block2_sptr' object has no attribute '_hb'
>
>
> I spent a lot of time to figure out this but could not resolve it, so
> I thought to get help from mailing list.
>
> Is this a bug or I am doing something wrong?

What your seeing is the interface wrapper looking for an attribute in
the wrapped instance 'self._impl' which used to be called 'self._hb'. So
it tries to lookup that first - and fails. Since both _impl and _hb are
marked protected they should not be accessed from outside the wrapper
directly (I remember some WXGUI code did that, but that has been fixed).
In the gnuradio tree I can't seem to find anything like this.

Can you check and see from where this Exception is raised from?

Sebastian

The issue was in my python code that I derived from packet.py file. I was using this with 3.6.3

gr.io_signature(1, 1, packet_source._hb.output_signature().sizeof_stream_item(0)) # Output signature)

I replaced it with

gr.io_signature(1, 1, packet_source.output_signature().sizeof_stream_item(0)) # Output signature)

GRC flowgraph is working fine.

Thanks,
Bob


reply via email to

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