'gr_top_block_sptr' object has no attribute '_setup_usrp'

Hi

I am trying to make digital-bert scripts work with USRP N200, RFX2400.
I
have changed my code a little bit. But it shows me an error saying
“object
has no attribute”.

aravind@COE-2X85V91:~/gnuradio/gnuradio-examples/python/digital-bert$
./benchmark_tx1.py -f 2500M
linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-ba0e3c8

gr_fir_ccf: using SSE
Modulation: 250k bits/sec
TX IF rate: 500k samples/sec
USRP interpolation: 256
DAC amplitude: 2000
Traceback (most recent call last):
File “./benchmark_tx1.py”, line 108, in
tb = tx_bpsk_block(options)
File “./benchmark_tx1.py”, line 52, in init
self._setup_usrp(options.ip,
File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py”,
line 94, in getattr
return getattr(self._tb, name)
AttributeError: ‘gr_top_block_sptr’ object has no attribute
‘_setup_usrp’

Can anyone help me out, how to resolve this error ? Attached is my
little
modified code.

On 04/08/2011 1:28 PM, saketh kumar wrote:

File
“/usr/local/lib/python2.6/dist-packages/gnuradio/gr/top_block.py”,
line 94, in getattr
return getattr(self._tb, name)
AttributeError: ‘gr_top_block_sptr’ object has no attribute ‘_setup_usrp’

Can anyone help me out, how to resolve this error ? Attached is my
little modified code.

Saketh Kumar
two things that immediately leap to mind:

o Indentation matters in Python.  Your definition of _setup_usrp

isn’t within the class definition for tx_bpsk_block
o The most recent UHD doesn’t distinguish between “single_usrp” and
“multi_usrp”, there’s just a “usrp_source” and “usrp_sink”
object.

On 05/08/2011 1:35 PM, saketh kumar wrote:

Hi

Thanks marcus. I am new to Gnu Radio and Python. I am working on
USRP N200 with RFX2400. I am trying to make digital-bert scripts to
work for UHD. I made some changes in the code but i am encoutering
errors. The latest error is shown below:
Looks to me like you’re trying to stuff a very-large floating-point
value into an integer. 32-bit integers are good to +/- 2**31, whereas
whatever value you have is very much larger than that. Usually, one
uses the error messages as a clue to debugging the code.

I got it what you are trying to say but i haven’t mentioned any integer
type
in the code so which very large value is it taking.

-saketh

Hi

Thanks marcus. I am new to Gnu Radio and Python. I am working on USRP
N200 with RFX2400. I am trying to make digital-bert scripts to work for
UHD.
I made some changes in the code but i am encoutering errors. The latest
error is shown below:

aravind@COE-CW85V91:~/gnuradio/gnuradio-examples/python/digital-bert$
./benchmark_tx1.py --tx-freq=2500M -g 32 --ip=192.168.10.2
linux; GNU C++ version 4.4.5; Boost_104200; UHD_003.001.002-5239879

gr_fir_ccf: using SSE
Modulation: 250k bits/sec
TX IF rate: 500k samples/sec
USRP interpolation: 256
DAC amplitude: 2000
– Opening a USRP2/N-Series device…
– Current recv frame size: 1472 bytes
– Current send frame size: 1472 bytes

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 131071 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000

UHD Warning:
The recv buffer could not be resized sufficiently.
Target sock buff size: 50000000 bytes.
Actual sock buff size: 131071 bytes.
See the transport application notes on buffer resizing.
Please run: sudo sysctl -w net.core.rmem_max=50000000
– mboard0 is MIMO master

UHD Warning:
Unable to set the thread priority. Performance may be negatively
affected.
Please see the general application notes in the manual for
instructions.
EnvironmentError: OSError: error in pthread_setschedparam
Gain d’board: 32 dB
Actual center frequency 2.5G
UUterminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::math::rounding_error


what(): Error in function boost::math::iround(d): Value
7.3939377762685976e+134 can not be represented in the target integer
type.
Aborted

any help or feedback will be appreciated.

Thanks
–Saketh

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

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

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

(grc:2586): 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’

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

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

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

(grc:2586): 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’