AttributeError: ' ' object has no attribute ' '

Discussion in 'Python' started by matt.doolittle33@gmail.com, Feb 23, 2013.

  1. Guest

    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?
    , Feb 23, 2013
    #1
    1. Advertising

  2. Re: AttributeError: ' ' object has no attribute ' '

    On Sun, Feb 24, 2013 at 5:22 AM, <> 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
    Chris Angelico, Feb 23, 2013
    #2
    1. Advertising


  3. > Date: Sat, 23 Feb 2013 10:22:54 -0800
    > Subject: AttributeError: ' ' object has no attribute ' '
    > From:
    > To:
    >
    > 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?
    > --
    > 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).
    Graham Fielding, Feb 24, 2013
    #3
  4. Guest

    Re: AttributeError: ' ' object has no attribute ' '

    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.
    , Feb 24, 2013
    #4
  5. Guest

    Re: AttributeError: ' ' object has no attribute ' '

    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.
    , Feb 24, 2013
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dont bother
    Replies:
    3
    Views:
    4,157
    scriber
    Mar 31, 2009
  2. Earl
    Replies:
    2
    Views:
    3,022
    Peter Otten
    May 6, 2004
  3. adrian
    Replies:
    4
    Views:
    705
    John J. Lee
    Apr 1, 2005
  4. rsd
    Replies:
    2
    Views:
    469
  5. crystalattice
    Replies:
    2
    Views:
    363
    crystalattice
    Sep 1, 2006
Loading...

Share This Page