[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] Making a GUI to execute python scripts generated by G
From: |
jason sam |
Subject: |
[Discuss-gnuradio] Making a GUI to execute python scripts generated by GRC |
Date: |
Wed, 18 Jun 2014 10:24:04 +0500 |
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 <lambda>
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 <lambda>
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
uhd_fft.py
Description: Text Data
wxgui.py
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Discuss-gnuradio] Making a GUI to execute python scripts generated by GRC,
jason sam <=