3

I'm trying out GNU Radio (Compantion) for the first time right now, having bought an RTL SDR (the SDR SMARt from NooElec) and trying to build a simple FM radio. I have a (reasonably correct) flowgraph and Compilation runs without errors, but when I try to run it, I get the following Error:

Generating: '/home/fl0wless/.grc_gnuradio/Radio.py'

Executing: /usr/bin/python3 -u /home/fl0wless/.grc_gnuradio/Radio.py

  File "/home/fl0wless/.grc_gnuradio/Radio.py", line 42
    self.samp_rate = samp_rate = 2M
                                  ^
SyntaxError: invalid syntax

Instead of substituting the value of samp_rate, it seems the whole expression is simply inserted. This also happens with all other variables, if I remove the current one another appears.

Is this a (known) bug? The GNU Radio installation is fresh, as is the python3 one, I haven't tampered with anything (yet).

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
Fl0wless
  • 318
  • 2
  • 12
  • Btw how do I close this? It says that I can only accept my own answer after two days... – Fl0wless May 16 '20 at 16:53
  • then the right thing to do is wait two days and accept your answer :) That's very much in the sense of this website, since it allows future readers to see how you've solved the issue (and current readers that you have already solved it). Thanks! – Marcus Müller May 18 '20 at 18:47

1 Answers1

13

Forget it, sorry, I found the problem: while Gnu Radio Companion will show you variables truncated with units (k, M, etc.) one cannot, in fact, enter them inside variable fields as they are not translated into their original python friendly numeric values. So my mistake was literally entering 2M into the field.

Fl0wless
  • 318
  • 2
  • 12