discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problem with tutorial 3 GNU radio in Python


From: Håkon Vågsether
Subject: Re: [Discuss-gnuradio] Problem with tutorial 3 GNU radio in Python
Date: Wed, 13 Sep 2017 15:28:27 +0200

Hey Shane,

You can fix this by moving line 129-131:

self.blocks_throttle_0 = blocks.throttle(gr.sizeof_float*1, samp_rate,True)
self.analog_sig_source_x_1 = analog.sig_source_f(samp_rate, analog.GR_SIN_WAVE, freq, ampl, 0)
self.analog_sig_source_x_0 = analog.sig_source_f(samp_rate, analog.GR_SQR_WAVE, 0.1, 1, 0)


to line 55. In other words, put them right after:
self.ampl = ampl = 1

You actually only need to move the line with analog_sig_source_x_1, but it might be nice to have them all in one place.

Best regards,
Håkon Vågsether

On Wed, Sep 13, 2017 at 10:37 AM, Jacqueline.Walker <address@hidden> wrote:
Hi Shane,

I believe this might be the solution. According to James Shimer on this thread, it's a race condition in the python code - read on down the thread. Anyway, the solution works, I tried it.

regards
Jacqueline
________________________________________
From: Discuss-gnuradio [discuss-gnuradio-bounces+jacqueline.walker=address@hiddenorg] on behalf of Shane Petcavich [address@hidden]
Sent: 12 September 2017 23:19:44
To: address@hidden
Subject: [Discuss-gnuradio] Problem with tutorial 3 GNU radio in Python

Hello,

I'm having an issue with tutorial3 in https://github.com/gnuradio/gr-tutorial, which I have cloned and put into a directory called solutions. I have tried this on xubuntu, 3 different installations of ubuntu 14.04 [virtual machines], and using the GNURadio Live USB. I have tried installing GNURadio from the binary, installing from source, and installing with pybombs. Currently using GNURadio 3.7.12.

When trying to run the solution if_else_mod.py in:

examples/tutorial3/python/

I get the error ' top_block_sptr' object has no attribute 'analog_sig_source_x_1'

This was previously discussed without much solution here: https://lists.gnu.org/archive/html/discuss-gnuradio/2013-11/msg00243.html

Any help would be appreciated.

Thanks,
srp



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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