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


Groups > comp.lang.python > #39715

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

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'exception': 0.03; 'attribute': 0.05; 'skip:" 60': 0.05; 'bug.': 0.07; 'run,': 0.07; 'wrapper': 0.07; 'python': 0.09; '__init__': 0.09; 'does,': 0.09; 'here?': 0.09; 'name)': 0.09; 'bug': 0.10; 'programs.': 0.11; 'ignore': 0.13; '24,': 0.16; '54,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:object': 0.16; 'tracebacks': 0.16; 'wrote:': 0.17; 'fix': 0.17; 'feb': 0.19; 'written': 0.20; 'not,': 0.21; 'deployed': 0.22; 'skip:s 70': 0.22; 'stopping': 0.22; 'seems': 0.23; 'raise': 0.24; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'developers': 0.26; 'am,': 0.27; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'things,': 0.29; 'probably': 0.29; "skip:' 10": 0.30; 'error': 0.30; 'code': 0.31; 'file': 0.32; "skip:' 20": 0.32; 'running': 0.32; 'getting': 0.33; "aren't": 0.33; 'scroll': 0.33; 'traceback': 0.33; 'ubuntu': 0.33; 'to:addr:python-list': 0.33; 'entry': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; "didn't": 0.36; 'should': 0.36; 'previous': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'your': 0.60; 'you.': 0.61; "you've": 0.61; 'real': 0.61; 'interest': 0.62; 'ever': 0.63; 'sound': 0.65; 'subject:skip:A 10': 0.75; '2013': 0.84; 'working,': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=zRVPiDlaXPc10r/yv/h66vZpPunL/umC80T27QCM+LY=; b=o+0CgjtNwEF2jYXeEDnQ/X8uHWMZflSeNFRFrpMJd2p6ORxUV5sjsrhdm4sGLoezyh N72Upc7wHD6sz1+afrxwUMH4332RhV8eUKRA6CUo2ls6YkwGsG8J5Blm9sSL27wabvVb zYKApLoTuAzdRnFRHsMGhO+jhAX+tycndf7Vk4IzQwwqOjuhNo0pnbij04zBrbRIjYVN HX5w2MUJppTPhuTwE098dX0E1nF+UvSTBS30H2z/bvjDITqF/LlrKqKh3DQ0gVsQ6nPH m861iMF4zwh234yvhWmCYnpwL0QqG4ozpFy2B5FhysYm31mZiIVpmknKlqE63ITVbOaZ rD0A==
MIME-Version 1.0
X-Received by 10.58.97.165 with SMTP id eb5mr8120233veb.40.1361657034727; Sat, 23 Feb 2013 14:03:54 -0800 (PST)
In-Reply-To <f1beb34a-c566-4ae5-8946-3e66a08896f9@googlegroups.com>
References <f1beb34a-c566-4ae5-8946-3e66a08896f9@googlegroups.com>
Date Sun, 24 Feb 2013 09:03:54 +1100
Subject Re: AttributeError: ' ' object has no attribute ' '
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2381.1361657042.2939.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361657042 news.xs4all.nl 6917 [2001:888:2000:d::a6]:49407
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39715

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web