AttributeError: 'BoxSizer' object has no attribute 'AddStretchSpacer' running usrp_fft.py

Hello all. I am new to gnuradio. I installed gnuradio on a three
computers
(a) an Ubuntu 6.06 P4-mobile laptop, (b) an Ubuntu 8.04 Dell SX270 mini
desktop, and © an Ubuntu 8.04 Dell Precision 560 dual Xeon-2.4GHz. On
each
machine I compile from source following the install directions for
Ubuntu on
the FAQ. On (a) everything runs perfectly, on (b) the command-line based
stuff works, but the GUI always fails out with some error like the one
shown
below before starting, on © same as (b). I am working with the usrp
hardware and have tried it with two different motherboards (both version
4.1) – both work correctly on (a) and give the same error messages on
both
(b) and ©. I’ve copied an example trace below. I get different errors
for
different gui’s. QWT-5.0.2 was installed from source per the FAQ. I
modified
/etc/lib.so.conf to include /usr/local/lib per the FAQ as well.

Thanks! -Jonathan

root@endeavour:~/gnuradio/gr-utils/src/python# ./usrp_fft.py
Traceback (most recent call last):
File “./usrp_fft.py”, line 306, in
main ()
File “./usrp_fft.py”, line 302, in main
app = stdgui2.stdapp(app_top_block, “USRP 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/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7700, in init
self._BootstrapApp()
File
“/usr/lib/python2.5/site-packages/wx-2.6-gtk2-unicode/wx/_core.py”,
line 7352, 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 “./usrp_fft.py”, line 124, in init
avg_alpha=options.avg_alpha)
File
“/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/fftsink2.py”,
line 175, in init
self.win = fft_window(self, parent, size=size)
File
“/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/fftsink2.py”,
line 308, in init
self.control_panel = control_panel(self)
File
“/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/fftsink2.py”,
line 241, in init
control_box.AddStretchSpacer()
AttributeError: ‘BoxSizer’ object has no attribute ‘AddStretchSpacer’

SOLVED. There is an error with the FAQ at
http://www.gnuradio.org/trac/wiki/UbuntuInstall

The recommended packages install for Hardy (and several other versions)
is:

sudo apt-get -y install g++ automake1.9 libtool python-dev fftw3-dev
libcppunit-dev libboost-dev sdcc libusb-dev libasound2-dev
libsdl1.2-dev python-wxgtk2.6 subversion guile-1.6 libqt3-mt-dev
python-numpy-ext

Which as you can see incorrectly refers to “python-wxgtk2.6”. The
correct package is “python-wxgtk2.8”. The error messages occur because
some functionality required by usrp gui’s was not yet implemented in
version 2.6… such as the addStrechSpace() method of the Sizer class.

Cheers,
-Jonathan

On Fri, Jun 20, 2008 at 5:16 AM, Jonathan F. [email protected]
wrote:

Which as you can see incorrectly refers to “python-wxgtk2.6”. The
correct package is “python-wxgtk2.8”. The error messages occur because
some functionality required by usrp gui’s was not yet implemented in
version 2.6… such as the addStrechSpace() method of the Sizer class.

Good catch. I’d recommend updating the Wiki (l/p guest/gnuradio), but
apparently there seems to be an issue with Trac:

Oops...
Trac detected an internal error:

database is locked

Hopefully that can get resolved and the instructions can be updated.

Brian

Pleasde Help me!!!
grc

(grc:1774): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,

(grc:1774): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,

(grc:1774): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,

(grc:1774): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,
<<< Welcome to GNU Radio Companion 3.2.2 >>>
Error: ‘options’

Failue
Traceback (most recent call last):
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
37, in init
self.import_data()
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Error: ‘options’

Failue
Traceback (most recent call last):
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
37, in init
self.import_data()
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Traceback (most recent call last):
File “/usr/bin/grc”, line 53, in
ActionHandler(args, Platform())
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 70, in init
self.handle_states(Actions.APPLICATION_INITIALIZE)
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 332, in handle_states
Actions.get_action_from_name(Actions.ELEMENT_DELETE).set_sensitive(bool(self.get_flow_graph().get_selected_elements()))
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
281, in get_flow_graph
return self.get_page().get_flow_graph()
AttributeError: ‘NoneType’ object has no attribute ‘get_flow_graph’

On Fri, Jun 20, 2008 at 06:48:36AM -0400, Brian P. wrote:

database is locked

Hopefully that can get resolved and the instructions can be updated.

Brian

Seems to be working as of now.

Eric