'BoxSizer' object has no attribute 'AddStretchSpacer'


#1

Hello Everyone,
I have freshely installed Gnuradio-3.1.3 on Red Hat Enterprise Linux
4.Everything is working fine.I have installed
python-wxPython-2.8.9.1-1.el4.pp.src.rpm for wx-gui interface.But
whenever i try to run the usrp_fft.py program I m getting “Attribute
Error” as shown below:-

[root@localhost 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.4/site-packages/gnuradio/wxgui/stdgui2.py”, line
36, in init
wx.App.init (self, redirect=False)
File
“/usr/lib/python2.4/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py”, line
5301, in init
self._BootstrapApp()
File
“/usr/lib/python2.4/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py”, line
4980, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)
File
“/usr/local/lib/python2.4/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.4/site-packages/gnuradio/wxgui/stdgui2.py”, line
60, in init
self.panel = stdpanel (self, self, top_block_maker)
File
“/usr/local/lib/python2.4/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.4/site-packages/gnuradio/wxgui/fftsink2.py”,
line 175, in init
self.win = fft_window(self, parent, size=size)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/fftsink2.py”,
line 308, in init
self.control_panel = control_panel(self)
File
“/usr/local/lib/python2.4/site-packages/gnuradio/wxgui/fftsink2.py”,
line 241, in init
control_box.AddStretchSpacer()
AttributeError: ‘BoxSizer’ object has no attribute ‘AddStretchSpacer’

I am very new to gnuradio installation.Please help me out.

Thanks.


#2

On Mon, Mar 16, 2009 at 4:29 AM, Jay K. removed_email_address@domain.invalid wrote:

File
“/usr/lib/python2.4/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py”, line
5301, in init
self._BootstrapApp()
File
“/usr/lib/python2.4/site-packages/wx-2.5.3-gtk2-ansi/wx/_core.py”, line
4980, in _BootstrapApp
return core.PyApp__BootstrapApp(*args, **kwargs)

It appears that the system actually already had wxPython 2.5.3
installed, and that is what is being found by GNU Radio. You will
need to uninstall that version, and ensure that the wxPython RPM you
manually installed is found.

Could you send the file config.log from your GNU Radio source tree?
We should be testing that the version we find is at least 2.6 (for
3.1.3), and either we’re not doing that or our test has a bug.

Thanks,

Johnathan


#3

Hi Jay,

Did you manage to install using the setup.py script

‘python setup.py install’

I faced the same problem last week during installation of release 1.3.1
on Fedora 6. I use wxPython-src-2.8.9.2 and need to do the following to
enable the second stage install of wxPython.

#export CFLAGS=-I/src/wxPython-src-2.8.9.2/contrib/include/ (due to some
missing include files)
#export LDFLAGS=-L/src/wxPython-src-2.8.9.2/lib (some missing libraries)
#python setup.py install UNICODE=0 BUILD_GLCANVAS=0

Basically, the idea is to set CFLAGS and LDFLAGS to the missing files
path.

My ‘wx-config --list’ gives the following

#wx-config --list

Default config is gtk2-ansi-release-2.8

Default config will be used for output

Legacy configs available in /usr/local:
wxgtk-2.4

After getting pass the second stage install the error

“AttributeError: ‘BoxSizer’ object has no attribute ‘AddStretchSpacer’”

should be gone.

Regards,
Hew