After re-building from svn, I now get the following error when
running this example:
…/gnuradio-trunk/gnuradio-examples/python/audio$ python audio_fft.py
Traceback (most recent call last):
File “audio_fft.py”, line 138, in
main ()
File “audio_fft.py”, line 134, in main
app = stdgui2.stdapp(app_top_block, “Audio FFT”, nstatus=1)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/
stdgui2.py”, line 36, in init
wx.App.init (self, redirect=False)
File “//usr/local/lib/wxPython-unicode-2.8.8.1/lib/python2.5/site-
packages/wx-2.8-mac-unicode/wx/_core.py”, line 7913, in init
self._BootstrapApp()
File “//usr/local/lib/wxPython-unicode-2.8.8.1/lib/python2.5/site-
packages/wx-2.8-mac-unicode/wx/_core.py”, line 7487, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/
stdgui2.py”, line 39, in OnInit
frame = stdframe (self.top_block_maker, self.title, self._nstatus)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/
stdgui2.py”, line 60, in init
self.panel = stdpanel (self, self, top_block_maker)
File “/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/
stdgui2.py”, line 81, in init
self.top_block = top_block_maker (frame, self, vbox, sys.argv)
File “audio_fft.py”, line 64, in init
self.scope = fftsink2.fft_sink_f (panel, fft_size=1024,
sample_rate=sample_rate, fft_rate=30,
AttributeError: ‘module’ object has no attribute ‘fft_sink_f’
Having a peek inside fftsink2.py, I replicate the first few lines in
my Python shell and find:
In [1]: from gnuradio import gr
In [2]: p = gr.prefs()
In [3]: style = p.get_string(‘wxgui’, ‘style’, ‘auto’)
In [4]: if style == ‘auto’:
…: style = ‘nongl’
…:
…:
In [5]: print style
auto # ‘gl’, ‘nongl’, or ‘auto’
This last tidbit seems incorrect.
I then discovered that I had a ~/.gnuradio/prefs (perhaps from a
previous installation of a release version of GR) and I deleted it.
BTW, this example did work OK under the release version.
I’m confused about prefs - when/how are they created, etc. Any
suggestions to help me run this example script?
thanks, Randy