Making a GUI to execute python scripts generated by GRC

Hi,
I have written a python code(wxgui.py) for a simple GUI using
wxPython.There is a button in it and by pressing that button i am
executing another python file.It’s working fine and i am able to call
any python file,but when i try to execute the python file created by
GRC(uhd_fft.py) i get the following error:

Form: <class ‘gnuradio.wxgui.forms.forms.text_box’> -> Error
translating value: “<main.MyFrame; proxy of <Swig Object of type
‘wxFrame *’ at 0x30f44a0> >”
bad operand type for abs(): ‘MyFrame’
Enter a float with optional scale suffix. E.g., 100.1M
Form: <class ‘gnuradio.wxgui.forms.forms.
slider’> -> Error translating value: “<main.MyFrame; proxy of
<Swig Object of type ‘wxFrame *’ at 0x30f44a0> >”
unsupported operand type(s) for -: ‘MyFrame’ and ‘float’
Value should be within slider range
Using Volk machine: avx_64_mmx_orc
Traceback (most recent call last):
File “wxgui.py”, line 26, in Execute
self.aNewFrame = uhd_fft.uhd_fft(self)
File “/home/ali/Desktop/WXGUI/uhd_fft.py”, line 155, in init
size=((-1, 400)),
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fftsink_gl.py”,
line 126, in init
persist_alpha=persist_alpha,
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fft_window.py”,
line 304, in init
self.update_grid()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/fft_window.py”,
line 401, in update_grid
baseband_freq - sample_rate/2.0,
TypeError: unsupported operand type(s) for -: ‘MyFrame’ and ‘float’
Traceback (most recent call last):
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py”,
line 102, in
widget.Bind(EVT_DATA, lambda x: self._update(x.data))
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py”,
line 248, in _update
def _update(self, value): self._text_box.SetValue(value);
self._update_color()
File
“/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_controls.py”,
line 1754, in SetValue
return controls.TextCtrl_SetValue(*args, **kwargs)
TypeError: String or Unicode type required
Traceback (most recent call last):
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py”,
line 102, in
widget.Bind(EVT_DATA, lambda x: self._update(x.data))
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py”,
line 181, in _update
def _update(self, value): self._slider.SetValue(int(round(value)))
TypeError: a float is required

Both files are as attached.Is there any other way for it?What am i
doing wrong?This issue is bothering me since long.

Regards,
Ali

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs