No attribute 'message_sink'

Hi,

I’m using USRP N210 with LFRX.

I installed uhd and gnuradio with build-gnuradio script without any
problem.

However, when I run an application, it has such error message:

self.sink = gr.message_sink(gr.sizeof_short*2, self.queue, False)

AttributeError: ‘module’ object has no attribute ‘message_sink’

Several months ago, I installed on several computers with the
build-gnuradio
script and run the same application, and there was no such problem.

Has gnuradio changed something recently?

Best regards,

Wu

Hi Wu,
yes, something has changed: GNU Radio made a version progression from
3.6 to 3.7. Part of this progress was that the standards blocks are now
part of the “blocks” module, and no longer of the “gr” module.
Please refer to the official GR wiki to learn about conversion from 3.6
to 3.7.

Greetings,
Marcus

Hi Marcus,

Thanks!
I changed the line to " self.sink =
blocks.message_sink(gr.sizeof_short*2, self.queue, False)"
and now it works.

Wu