# Ofdm\_txrx.py

**URL:** <https://www.ruby-forum.com/t/ofdm-txrx-py/240644>\
**Category:** GNU Radio\
**Created:** [April 24, 2014, 4:43am UTC](https://www.ruby-forum.com/t/ofdm-txrx-py/240644 "2014-04-24T04:43:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 24, 2014, 4:43am UTC](https://www.ruby-forum.com/t/ofdm-txrx-py/240644/1 "2014-04-24T04:43:23Z")

</div>

I run the file “ofdm\_txrx.py” from terminal using command  
./ofdm\_txrx.py  
But I got errors !!! why ?

Thanks in advance ! Here is the output on terminal:

./ofdm\_txrx\_me.py: line 26:  
OFDM Transmitter / Receiver hier blocks.

For simple configurations, no need to connect all the relevant OFDM  
blocks  
to form an OFDM Tx/Rx–simply use these.  
: No such file or directory  
./ofdm\_txrx\_me.py: line 31: import: command not found  
from: can’t read /var/mail/gnuradio  
./ofdm\_txrx\_me.py: line 33: import: command not found  
from: can’t read /var/mail/utils  
./ofdm\_txrx\_me.py: line 36: try:: command not found  
from: can’t read /var/mail/gnuradio  
from: can’t read /var/mail/gnuradio  
from: can’t read /var/mail/gnuradio  
./ofdm\_txrx\_me.py: line 41: except: command not found  
./ofdm\_txrx\_me.py: line 43: import: command not found  
./ofdm\_txrx\_me.py: line 44: import: command not found  
./ofdm\_txrx\_me.py: line 45: import: command not found  
./ofdm\_txrx\_me.py: line 47: \_def\_fft\_len: command not found  
./ofdm\_txrx\_me.py: line 48: \_def\_cp\_len: command not found  
./ofdm\_txrx\_me.py: line 49: \_def\_frame\_length\_tag\_key: command not found  
./ofdm\_txrx\_me.py: line 50: \_def\_packet\_length\_tag\_key: command not  
found  
./ofdm\_txrx\_me.py: line 51: \_def\_packet\_num\_tag\_key: command not found  
./ofdm\_txrx\_me.py: line 53: syntax error near unexpected token `(' ./ofdm_txrx_me.py: line 53:`\_def\_occupied\_carriers = (range(-26, -21) +  
range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22,  
27),)’

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 25, 2014, 3:36am UTC](https://www.ruby-forum.com/t/ofdm-txrx-py/240644/2 "2014-04-25T03:36:05Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Sara,

this is a python module, not an executable file.  
It seems like you tried to run it, and since it does not specify  
otherwise, your shell tried to treat it as a shell script. Won’t work.

That file contains hierarchical blocks, which you can use in a flow  
graph, not on their own.

I still get the feeling that you’re jumping around in GNU Radio code  
without really knowing what you’re looking at. I suggest doing the  
introductory guides from the wiki; please go to [http://gnuradio.org](http://gnuradio.org)  
and read the “How do I use GNU Radio?” page and at least the first two  
“beginner level tutorials” from  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/Tutorials](http://gnuradio.org/redmine/projects/gnuradio/wiki/Tutorials) page.

Greetings,  
Marcus

On 24.04.2014 04:42, Sara C. wrote:

> blocks to form an OFDM Tx/Rx–simply use these. : No such file or  
> ./ofdm\_txrx\_me.py: line 48: \_def\_cp\_len: command not found  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTWMVbAAoJEBQ6EdjyzlHtg9sH/2GcP0iQFNEWm/z/g5hw+Dzh  
G2lSNoGFvxpn2EMfiSd8p3BxUnxc0mRLQFDel6f8wJjUGVUkB7WGvYKs7Kf5SDl5  
Sq5IU0ceRVOFG/23rpeVtCaXwbAOM5xswfCPykase6Wi1Zr19uzPf62r3ssqzXPT  
rFnfBmPVWfpADE7Pbvajy+pyufKqEy0GBqjvWH0aUBVfiKGzZCwF8UQ5229vtiuE  
43uPZi+TduBf92VyyoGTNQvhsli4kiB2+uE906jcIojjIPX6xQjQuTNeDnpLRrI7  
hzlhiNjsFUd4Cr/S6Uamgvb38pDALhQWdP6GwQbGXTa9P26CdxgkxBgbmZ41/Fk=  
=T8Ud  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 25, 2014, 5:31am UTC](https://www.ruby-forum.com/t/ofdm-txrx-py/240644/3 "2014-04-25T05:31:46Z")

</div>

On Wed, Apr 23, 2014 at 10:42 PM, Sara C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> to form an OFDM Tx/Rx–simply use these.  
> ./ofdm\_txrx\_me.py: line 43: import: command not found  
> 27),)’

It looks like it’s not being recognized by your shell as a Python  
program.  
Try running as:

$ python ofdm\_txrx.py

Tom

---

<div class="post-metadata">

**Author:** ![Sara\_ChSSrif](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@Sara\_ChSSrif](https://www.ruby-forum.com/u/Sara_ChSSrif)\
**Post date:** [April 25, 2014, 6:39am UTC](https://www.ruby-forum.com/t/ofdm-txrx-py/240644/4 "2014-04-25T06:39:38Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hi Sara,

this is a python module, not an executable file.  
It seems like you tried to run it, and since it does not specify  
otherwise, your shell tried to treat it as a shell script. Won’t work.

That file contains hierarchical blocks, which you can use in a flow  
graph, not on their own.

I still get the feeling that you’re jumping around in GNU Radio code  
without really knowing what you’re looking at. I suggest doing the  
introductory guides from the wiki; please go to [http://gnuradio.org](http://gnuradio.org)  
and read the “How do I use GNU Radio?” page and at least the first two  
“beginner level tutorials” from  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/Tutorials](http://gnuradio.org/redmine/projects/gnuradio/wiki/Tutorials) page.

Greetings,  
Marcus

On 24.04.2014 04:42, Sara C. wrote:

> OFDM blocks to form an OFDM Tx/Rx–simply use these. : No such file  
> ./ofdm\_txrx\_me.py: line 48: \_def\_cp\_len: command not found  
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio  
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTWNP5AAoJEBQ6EdjyzlHtZ1IH/1MU8yjObQt0vSxeRA0PAtW/  
9z15fYN1LRFk8bc0ikjzl1brMg30N9XOrQJkZkCLhdUG65DFAxCI0eM//DSEAJCo  
/6aN7K7msXEzG9UwLC5eV3vNpQatS2LWIVzX4boXJeL9WWReGCwMZO4D7Sr2oQrr  
LyySHE/RF3j8qiz04Yy5vl4AvXCam94jfCj4CZ/eahqOGjaF3RRk83xtfJ5kD+tU  
NIBWf/gZ0mG5GJDKEsqbbEh3ngd7/D510QYQy3D4f7JrHzKnfhblIDUiBlRQvzgF  
SyXYhiy3IaM9uH4lHbRLcFyv+P5Ny7lFOgrxSaxDqb4JYdXUM77UPE8kXsoSDB8=  
=DCm+  
-----END PGP SIGNATURE-----
