[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Problem loading Python block
From: |
Martin Braun (CEL) |
Subject: |
Re: [Discuss-gnuradio] Problem loading Python block |
Date: |
Fri, 25 Jan 2013 17:18:46 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
For a hier block in Python, do
$ gr_modtool.py add -t hier -l python
You need 3.6.3 to do that.
Also, you'll need a new version of modtool (it usually lags a bit behind
changes in GNU Radio).
MB
On Fri, Jan 25, 2013 at 05:05:56PM +0100, Nemanja Savic wrote:
> 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 <module>
> 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 <module>
> import test
> File "/usr/local/lib64/python2.6/site-packages/test/__init__.py", line 49,
> in
> <module>
> from packet_proba import *
> File "/usr/local/lib64/python2.6/site-packages/test/packet_proba.py", line
> 51, in <module>
> 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
>
>
> --
> Nemanja Savić
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
--
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
Dipl.-Ing. Martin Braun
Research Associate
Kaiserstraße 12
Building 05.01
76131 Karlsruhe
Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu
KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
pgp2UL4ws9UFi.pgp
Description: PGP signature
- [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/25
- Re: [Discuss-gnuradio] Problem loading Python block,
Martin Braun (CEL) <=
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/25
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/28
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/28
- Re: [Discuss-gnuradio] Problem loading Python block, Martin Braun (CEL), 2013/01/28
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/28
- Message not available
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/29
- Re: [Discuss-gnuradio] Problem loading Python block, Tom Rondeau, 2013/01/29
- Message not available
- Re: [Discuss-gnuradio] Problem loading Python block, Tom Rondeau, 2013/01/29
- Re: [Discuss-gnuradio] Problem loading Python block, Nemanja Savic, 2013/01/29
- Message not available
- [Discuss-gnuradio] Fwd: Problem loading Python block, Nemanja Savic, 2013/01/29