Dear Ting, that's a different problem altogether:
GNU Radio 3.8's GRC **can** open and convert old 3.7 flow graphs. GNU Radio 3.7's GRC **can not** open and convert new 3.8 flow graphs. In all honesty, it's time to convert your 3.7 flow graphs and blocks a modern version of GNU Radio if your best solution is to get an outdated system out of storage to use them; 3.8 isn't exactly brand new by now. Best regards, Marcus On 15.01.21 01:31, Ting Wu wrote: > Hi Criss, > > Unfortunately it seems there is no easy solution to this problem. But at > least I can go back to Ubuntu18 which installs gnuradio 3.7 and I can > still use my old codes. > > Regards, > > Ting Wu > > On 2021/01/15 1:49, Criss Swaim wrote: >> >> Hi Ting: >> >> I have been working on this same issue for a couple of day and have >> not found a solution. Did you find a solution to the missing >> "message_sink"? >> >> Criss Swaim >> csw...@tpginc.net >> cell: 505.301.5701 >> On 1/6/2021 8:46 PM, Ting Wu wrote: >>> Hi! >>> >>> I recently upgraded to gnuradio 3.8 and my old code threw the >>> following error: >>> >>> module 'gnuradio.blocks' has no attribute 'message_sink' >>> >>> Is the 'message_sink' has been deprecated in the recent version of >>> gnuradio? If so, what should I use now for the message source and >>> sink? I really do not want to rewrite all the codes, so I would be >>> really grateful if there is a simple way to make the following code >>> work with the recent version of gnuradio. The code simply gets data >>> stream from a USRP N200 (LFRX daughterboard). >>> >>> ================================================= >>> class my_block(gr.top_block): >>> def __init__(self): >>> gr.top_block.__init__(self) >>> self.source = uhd.usrp_source(device_addr="", >>> stream_args=uhd.stream_args('sc16', 'sc16', args="scalar=1024")) >>> >>> self.source.set_samp_rate(samp_rate) >>> self.source.set_gain(gain) >>> self.source.set_center_freq(0) >>> >>> self.queue = gr.msg_queue() >>> self.sink = blocks.message_sink(gr.sizeof_short*2, >>> self.queue, False) #This line throws the error >>> self.connect(self.source, self.sink) >>> =================================================== >>> >>> Thanks in advance! >>> >>> Ting Wu >>> >>> >