discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] fftsink2.py, /prefs


From: Randy Heiland
Subject: [Discuss-gnuradio] fftsink2.py, /prefs
Date: Mon, 18 Aug 2008 15:49:54 -0400

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 <module>
    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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]