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 <jacqueline.wal...@ul.ie
> 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=
> ul...@gnu.org] on behalf of Shane Petcavich [spetcav...@hme.com]
> Sent: 12 September 2017 23:19:44
> To: discuss-gnuradio@gnu.org
> 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
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to