Forum: GNU Radio AttributeError: 'Block' object has no attribute 'horizontal_label'

Posted by Omer Omer (Guest)
on 2013-02-28 08:58
(Received via mailing list)
when i run my own block in gnuradio-companion square_ff ,the following 
error i get
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py", 
line 307, in _handle_action
 self.get_flow_graph().update()
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 312, in update
 self.create_labels()
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Element.py", 
line 64, in create_labels
 for child in self.get_children(): child.create_labels()
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
134, in create_labels
 markups = [param.get_markup() for param in self.get_params() if 
param.get_hide() not in ('all',
 'part')]
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", 
line 209, in get_hide
 lambda p: ' '.join([p._type, p._nports]), 
self.get_parent().get_ports())
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", 
line 209, in <lambda>
 lambda p: ' '.join([p._type, p._nports]), 
self.get_parent().get_ports())
TypeError: sequence item 0: expected string, instance found
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in
 draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File
 "/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in
 draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING,
 y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in
 _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File
 "/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", 
line 185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute
 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File
 "/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw

 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Traceback (most recent call last):
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", 
line 132, in _handle_window_expose
 self._flow_graph.draw(gc, self._pixmap)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", 
line 281, in draw
 element.draw(gc, window)
 File 
"/usr/local/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 
185, in draw
 window.draw_drawable(gc, self.horizontal_label, 0, 0, 
x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1)
AttributeError: 'Block' object has no attribute 'horizontal_label'
Posted by Tom Rondeau (Guest)
on 2013-02-28 15:15
(Received via mailing list)
On Thu, Feb 28, 2013 at 2:52 AM, Omer Omer <omer9994@yahoo.com> wrote:

> when i run my own block in gnuradio-companion square_ff ,the following
> error i get
>

Omer,

Can you run simple programs in GRC that don't use your square_ff? Just
create a signal source -> throttle -> wxgui sink program and verify that
works for you. This looks like a problem in GRC like you're missing
something and not specific to your new block.

Tom
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.