AttributeError: ' ' object has no attribute ' '

M

matt.doolittle33

I am using Ubuntu 12.10, and Python 2.7.3, GNU Radio Companion v3.6.3. I get the this error in terminal:

in __init__
self.wxgui_waterfallsink2_0.set_callback(wxgui_waterfallsink2_0_callback)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 54, in __getattr__
return getattr(self._hb, name)
AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

I have been getting this error in multiple programs. So what is stopping the program here? There is no Attribute .set_callback obviously. But where is this attribute missing from exactly and how do i put it where it should be?
 
C

Chris Angelico

I am using Ubuntu 12.10, and Python 2.7.3, GNU Radio Companion v3.6.3. I get the this error in terminal:

in __init__
self.wxgui_waterfallsink2_0.set_callback(wxgui_waterfallsink2_0_callback)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 54, in __getattr__
return getattr(self._hb, name)
AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

I have been getting this error in multiple programs. So what is stopping the program here? There is no Attribute .set_callback obviously. But where is this attribute missing from exactly and how do i put it where it should be?

That's what the traceback is for. The 54th line in ....hier_block2.py
is "return getattr(self._hb, name)", and on this particular run,
self._hb was a gr_hier_block2_sptr and name was set_callback. But from
the look of things, that's not the real problem; it seems to be a thin
wrapper around some other object, so you probably want to go up to the
previous entry in the traceback, which doesn't seem to be complete
here.
From the sound of things, you didn't write GNU Radio Companion. If
you're running a deployed application, exception tracebacks aren't
really your concern, and it's not your job to fix them. Is the program
working as expected? If not, raise a bug report with its maintainers,
and quote the whole traceback; its own developers will know what to do
with it. Even if everything seems to be working, it may be as well to
report it, as it may be concealing some other bug.

Of course, if you HAVE written some code around the GNU Radio
Companion (a script calling on it or somesuch), then the exception may
be of interest to you. Scroll up to see if the traceback ever names a
file that you've edited; if it does, ignore everything below there and
just look at the last line that you work with. That'll tell you, in
all probability, where it is you need to fix something.

ChrisA
 
G

Graham Fielding

Date: Sat, 23 Feb 2013 10:22:54 -0800
Subject: AttributeError: ' ' object has no attribute ' '
From: (e-mail address removed)
To: (e-mail address removed)

I am using Ubuntu 12.10, and Python 2.7.3, GNU Radio Companion v3.6.3.. I get the this error in terminal:

in __init__
self.wxgui_waterfallsink2_0.set_callback(wxgui_waterfallsink2_0_callback)
File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/hier_block2.py", line 54, in __getattr__
return getattr(self._hb, name)
AttributeError: 'gr_hier_block2_sptr' object has no attribute 'set_callback'

I have been getting this error in multiple programs. So what is stoppingthe program here? There is no Attribute .set_callback obviously. But where is this attribute missing from exactly and how do i put it where it should be?
That error means that 'gr_hier_block2_sptr' doesn't have enough informationto proceed. If you look at the top of the defintion (for example, 'def gr_hier_block2_sptr, [attribute], [another attribute]'), that's where you should find .set_callback. If it's not there, you'l just need to addit to the end; if it is there, then the attribute is probably given a different name somewhere else (so you'll just need to find out its new name and update the existing entry).
 
M

matt.doolittle33

yeah im not a programmer, i have not wrote anything here that i am trying to use; i am an end user. my only interest in this code is to get the program working. so i have to do what i have to do try to get it working. im just hoping that what im going through here, this error thats coming up here, has been encountered by someone else that has solved it and that someone will see this and care to tell me how fix it.
 
M

matt.doolittle33

yeah im not a programmer, i have not wrote anything here that i am trying to use; i am an end user. my only interest in this code is to get the program working. so i have to do what i have to do try to get it working. im just hoping that what im going through here, this error thats coming up here, has been encountered by someone else that has solved it and that someone will see this and care to tell me how fix it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top