No attribute 'message_sink'


I’m using USRP N210 with LFRX.

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

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
script and run the same application, and there was no such problem.

Has gnuradio changed something recently?

Best regards,


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.


Hi Marcus,

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


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs