Step 1: In my work folder, delete the offending python files: if_else.py and if_else_mod.py Re-generate if_else.py from GRC and if_else.grc (flowgraph) - OK Execute - OK, it runs, looks like picture in Tutorial 3, no error messages produced Re-do the modifications to the variable_function_probe def as shown in Tutorial 3. Save as if_else_mod.py in my work directory. Run as at the prompt@ python if_else_mod.py Does not run, you get: ko File "if_else_mod.py", line 17 print "Warning: failed to XInitThreads" I believe this is an error due to it not conforming to syntax requirments for python3 which is "python" under my installation. Run as at the prompt@ python2.7 if_else_mod.py It runs and produces the plot with 1000/0.3 until it reaches the if else construct when it does the first print val (0.0) then: Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_innerself.run() File "/usr/lib/python2.7/threading.py", line 754, in runself.__target(*self.__args,**self.__kwargs) File "if_else_mod.py", line 94, in _variable_function_probe_0_probeself.set_ampl(.3) File "if_else_mod.py", line 198, in set_ampl File "/usr/lib/python2.7/site-packages/gnuradio/gr/hier/hier_block2.py", line 92, in __getattr__ return getattr(self.__impl, name) AttributeError: 'top_block_sptr' object has no attribute 'analog_sig_source_x_1' Result of Kompare between work/if_else.py and work/if_else_mod.py The ONLY difference between these two files is the code entered under the instructions of the tutorial. Step 2: Go to solutions/gr-tutorial/examples/tutorial3/grc_files Open the if_else.grc example file, re-generate and execute. Goes exactly as above with mine in step 1. Result of Kompare between work/if_else.py and solutions/gr-tutorial/examples/tutorial3/grc_files/if_else.py Only one difference: in self.qtgui_time_sink_x_0 = qtgui.time_sink_f(1024, #size samp_rate #samp_rate "", #name 1 #number of inputs) #name is 'QT GUI Plot' instead of empty string in mine Step 3: Go to solutions/gr-tutorial/examples/tutorial3/python It contains another copy of if_else.py and a copy of if_else_mod.py both provided from the github clone. Result of Kompare ~/grc_files/if_else.py and ~/python/if_else.py There is a whole if __name__ == '__main__' block at top of the generated file in the methods self.freq_line_edit.returnPressed.connect() and self.ampl_line_edit.returnPressed.connect() in the parameters passed in connect() the type is cast to int(self....) in the 'original' code and str(self....) in the generated code e.g. self.freq_line_edit.returnPressed.connect(lambda: self.set_freq(int/str(self.freq_line_edit.text().toAsci()))) single quotes vs double quotes for the #name of QT gui time sink There are some extra settings of labels, grid etc. in the QT Gui Time Sink in the generated code, slightly different ordering of some statements in the files etc. Big difference: in the generated code there is a def main block which has parameters top_block_cls = if_else and lower down sets tb = top_block_cls() In the 'original' code the if __name__ == '__main__' block the same as at top of the generated file appears here at the bottom and tb = if_else() There is a final if __name__ == '__main__' main() at the very end of the generated file. Step 4: If you run 'if_else_mod.py' from ~/python in the solutions folder, you get the exact same runtime errors as in step 1. Go Figure! Differences (again using Kompare) between my 'if_else_mod.py' and theirs are the same as between the generated SOLUTIONS if_else.py and the 'original' (in the solutions/python folder) if_else.py.