Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39693 > unrolled thread

AttributeError: ' ' object has no attribute ' '

Started bymatt.doolittle33@gmail.com
First post2013-02-23 10:22 -0800
Last post2013-02-23 16:43 -0800
Articles 5 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  AttributeError:  '  ' object has no attribute '  ' matt.doolittle33@gmail.com - 2013-02-23 10:22 -0800
    Re: AttributeError: ' ' object has no attribute ' ' Chris Angelico <rosuav@gmail.com> - 2013-02-24 09:03 +1100
      Re: AttributeError: ' ' object has no attribute ' ' matt.doolittle33@gmail.com - 2013-02-23 19:34 -0800
      Re: AttributeError: ' ' object has no attribute ' ' matt.doolittle33@gmail.com - 2013-02-23 19:34 -0800
    RE: AttributeError:  '  ' object has no attribute '  ' Graham Fielding <frednotbob@hotmail.ca> - 2013-02-23 16:43 -0800

#39693 — AttributeError: ' ' object has no attribute ' '

Frommatt.doolittle33@gmail.com
Date2013-02-23 10:22 -0800
SubjectAttributeError: ' ' object has no attribute ' '
Message-ID<f1beb34a-c566-4ae5-8946-3e66a08896f9@googlegroups.com>
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?  

[toc] | [next] | [standalone]


#39715 — Re: AttributeError: ' ' object has no attribute ' '

FromChris Angelico <rosuav@gmail.com>
Date2013-02-24 09:03 +1100
SubjectRe: AttributeError: ' ' object has no attribute ' '
Message-ID<mailman.2381.1361657042.2939.python-list@python.org>
In reply to#39693
On Sun, Feb 24, 2013 at 5:22 AM,  <matt.doolittle33@gmail.com> 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_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

[toc] | [prev] | [next] | [standalone]


#39730 — Re: AttributeError: ' ' object has no attribute ' '

Frommatt.doolittle33@gmail.com
Date2013-02-23 19:34 -0800
SubjectRe: AttributeError: ' ' object has no attribute ' '
Message-ID<a38db1ce-8083-418f-9b9d-2b1711bc99b0@googlegroups.com>
In reply to#39715
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.

[toc] | [prev] | [next] | [standalone]


#39731 — Re: AttributeError: ' ' object has no attribute ' '

Frommatt.doolittle33@gmail.com
Date2013-02-23 19:34 -0800
SubjectRe: AttributeError: ' ' object has no attribute ' '
Message-ID<mailman.2393.1361677357.2939.python-list@python.org>
In reply to#39715
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.

[toc] | [prev] | [next] | [standalone]


#39725

FromGraham Fielding <frednotbob@hotmail.ca>
Date2013-02-23 16:43 -0800
Message-ID<mailman.2389.1361666658.2939.python-list@python.org>
In reply to#39693

[Multipart message — attachments visible in raw view] — view raw

 > Date: Sat, 23 Feb 2013 10:22:54 -0800
> Subject: AttributeError:  '  ' object has no attribute '  '
> From: matt.doolittle33@gmail.com
> To: python-list@python.org
> 
> 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?  
> -- 
> http://mail.python.org/mailman/listinfo/python-list
That error means that 'gr_hier_block2_sptr' doesn't have enough information to 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 add it 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). 		 	   		  

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web