Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > AttributeError: ' ' object has no attribute ' '

Reply
Thread Tools

AttributeError: ' ' object has no attribute ' '

 
 
matt.doolittle33@gmail.com
Guest
Posts: n/a
 
      02-23-2013
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_wat erfallsink2_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?
 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      02-23-2013
On Sun, Feb 24, 2013 at 5:22 AM, <(E-Mail Removed)> wrote:
> 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_wat erfallsink2_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
 
Reply With Quote
 
 
 
 
Graham Fielding
Guest
Posts: n/a
 
      02-24-2013

> Date: Sat, 23 Feb 2013 10:22:54 -0800
> Subject: AttributeError: ' ' object has no attribute ' '
> From: http://www.velocityreviews.com/forums/(E-Mail Removed)
> To: (E-Mail 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_wat erfallsink2_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?
> --
> http://mail.python.org/mailman/listinfo/python-list

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).
 
Reply With Quote
 
matt.doolittle33@gmail.com
Guest
Posts: n/a
 
      02-24-2013
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.
 
Reply With Quote
 
matt.doolittle33@gmail.com
Guest
Posts: n/a
 
      02-24-2013
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
class object's attribute is also the instance's attribute? 陈伟 Python 9 08-30-2012 03:20 PM
AttributeError: 'module' object has no attribute 'urlopen' dont bother Python 3 03-31-2009 10:30 PM
ATTRIBUTE ERROR: 'module' object has no attribute 'ssl' johnny Python 5 12-10-2006 01:10 PM
pythoncom - 'module' object has no attribute 'frozen' Paul Python 3 10-18-2003 07:31 AM
sys.argv[0] - 'module' object has no attribute 'argv' =?ISO-8859-1?Q?Thomas_N=FCcker?= Python 0 06-30-2003 02:07 PM



Advertisments