Closed sbfreddie closed 12 years ago
Yeah, this feels like an issue with multimode.py
and not with your gnuradio installation. Feel free to reopen this issue if you find out otherwise from the authors of multimode.py
.
Jonathan: I looks like the problem is caused by an older version of gnu radio. Check out this email I found:
Re: Multimode.py giving error with gnuradio 3.6.0
Posted by Marcus D. Leech (Guest) on 2012-06-18 05:17
On 17/06/12 11:09 PM, Vikas N Kumar wrote:
root# ./multimode.py offs=options.offs, flist=options.flist, dfifo=options.dfifo, mbw=options.mbw, deemph=options.deemph) File "./multimode.py", line 340, in init self.wxgui_waterfallsink2_0.set_callback(wxgui_waterfallsink2_0_callback) File "/usr/local/lib/python2.6/dist-packages/gnuradio/gr/hier_block2.py", line 50, in getattr return getattr(self._hb, name) AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'
This is almost certainly caused by having a version of Gnu Radio that isn't up-to-date. Are you sure you're running the version you think you're running? The GIT master of Gnu Radio has support for the 'set_callback' function used, but older ones don't.
Principal Investigator Shirleys Bay Radio Astronomy Consortium http://www.sbrac.org
It looks like a version problem, we need to update to a newer version of gnu radio.
Thanks, Freddie
Try brew install gnuradio --HEAD
(I haven't tested this version)
I tried using HEAD, but nothing has changed. gnuradio-companion works, but multimode.py still dies the same way.
Thanks, Freddie
HEAD
is the latest version from git, so if it's a gnuradio version issue, that should have fixed the problem. I don't have any other suggestions, unfortunately.
I'm experiencing this same issue, fyi. gnuradio-config-info outputs v3.6.2.-1-ga4e2e8a9
After installing the homebrew gnuradio on a 10.7.4 machine, I also ran into the
AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'
error when trying to run multimode.py
After adjusting ~/.gnuradio/config.conf, then multimode.py returned:
RuntimeError: Unable to import OpenGL. Are Python wrappers for OpenGL installed?
After installing PyOpenGL-3.0.2b2, multimode.py is still not happy and dies with this error message:
% multimode.py Mac OS; Clang version 3.1 (tags/Apple/clang-318.0.61); Boost_105000; UHD_003.004.003-177-g584b7ae2
Using Volk machine: sse4_1_64_orc gr-osmosdr supported device types: file fcd rtl rtl_tcp uhd Using device #0: ezcap USB 2.0 DVB-T/DAB/FM dongle Found Elonics E4000 tuner Exact sample rate is: 1000000.026491 Hz
gr_fir_ccc: using SSE gr_fir_fff: using SSE Traceback (most recent call last): File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/wxgui/plotter/plotter_base.py", line 187, in _on_paint for fcn in self._draw_fcns: fcn[1]() File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/wxgui/plotter/plotter_base.py", line 59, in draw self._draw() File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/wxgui/plotter/grid_plotter_base.py", line 260, in _draw_grid (scaled_tick, self.height-self.padding_bottom), File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gnuradio/wxgui/plotter/grid_plotter_base.py", line 368, in _draw_grid_line GL.glVertexPointerf(points) File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.0.2b2-py2.7.egg/OpenGL/latebind.py", line 45, in call return self._finalCall( _args, *_named ) File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.0.2b2-py2.7.egg/OpenGL/wrapper.py", line 533, in wrapperCall cArgs, File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.0.2b2-py2.7.egg/OpenGL/arrays/arrayhelpers.py", line 154, in call contextdata.setValue( self.constant, pyArgs[self.pointerIndex] ) File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.0.2b2-py2.7.egg/OpenGL/contextdata.py", line 57, in setValue context = getContext( context ) File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyOpenGL-3.0.2b2-py2.7.egg/OpenGL/contextdata.py", line 40, in getContext """Attempt to retrieve context when no valid context""" OpenGL.error.Error: Attempt to retrieve context when no valid context
% gnuradio-config-info -v 3.6.1
% cat ~/.gnuradio/config.conf [grc] local_blocks_path=/usr/local/share/gnuradio/grc/blocks
Run into the same error above if I change config.conf to this:
% cat ~/.gnuradio/config.conf [grc] local_blocks_path=/usr/local/share/gnuradio/grc/blocks [wxgui] style=gl fft_rate=30 waterfall_rate=30 scope_rate=30 number_rate=5 const_rate=5 const_size=2048
Here is the terminal output:
Using Volk machine: ssse3_64_orc Traceback (most recent call last): File "/Users/freddie/bin/multimode.py", line 1099, in
tb = multimode(ahw=options.ahw, freq=options.freq, ppm=options.ppm, vol=options.vol, ftune=options.ftune, xftune=options.xftune, srate=options.srate, upclo=options.upclo, devinfo=options.devinfo, agc=options.agc, arate=options.arate, upce=options.upce, mthresh=options.mthresh, offs=options.offs, flist=options.flist, dfifo=options.dfifo, mbw=options.mbw, deemph=options.deemph, dmode=options.dmode)
File "/Users/freddie/bin/multimode.py", line 341, in init
self.wxgui_waterfallsink2_0.set_callback(wxgui_waterfallsink2_0_callback)
File "/usr/local/lib/python2.7/site-packages/gnuradio/gr/hier_block2.py", line 50, in getattr
return getattr(self._hb, name)
AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'
Perhaps this is the wrong forum to bring this up?
Thanks, Freddie