[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Beginner Question: python script error when doing
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Beginner Question: python script error when doing connect() |
Date: |
Wed, 16 Sep 2009 14:23:39 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Sep 16, 2009 at 03:09:54PM -0400, Chukhman, Ilya A. wrote:
> Hello,
>
> I am trying to create a python equivalent of tx_samples.cc -- to transmit
> samples captured with usrp2_rx_cfile.py. When running my program, I receive
> the following error:
>
> Traceback (most recent call last):
> File "./usrp2_tx_cfile.py", line 151, in <module>
> tb = tx_cfile_block(options, filename)
> File "./usrp2_tx_cfile.py", line 80, in __init__
> self.connect(self._src, self._u);
> File "/usr/lib/python2.6/dist-packages/gnuradio/gr/top_block.py", line 124,
> in connect
> self._connect(points[i-1], points[i])
> File "/usr/lib/python2.6/dist-packages/gnuradio/gr/top_block.py", line 130,
> in _connect
> dst_block.basic_block(), dst_port)
> File
> "/usr/lib/python2.6/dist-packages/gnuradio/gr/gnuradio_swig_py_runtime.py",
> line 1443, in connect
> return _gnuradio_swig_py_runtime.gr_top_block_sptr_connect(*args)
> ValueError: itemsize mismatch: file_source(2):0 using 2, usrp2_sink_16sc(1):0
> using 4
>
> From the error, it appears that the connect() call is failing, but I am not
> sure why.
>
> This is what my usrp2_tx_cfile.py looks like.
>
> Thank you for your help.
> Ilya
You're sending 2-byte wide data into a input that expects 4-byte wide data.
Eric