Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python': 0.08; 'context.': 0.09; 'wrong,': 0.09; 'error:': 0.10; 'output': 0.10; 'argument': 0.15; 'cc:addr:python-list': 0.15; 'this:': 0.15; 'intermittent': 0.16; 'like?': 0.16; 'occasionally': 0.16; 'unbound': 0.16; 'wrote:': 0.16; 'wed,': 0.17; 'instance': 0.18; 'subject:problem': 0.19; 'cheers,': 0.20; '(most': 0.21; 'subject:not': 0.21; 'cc:no real name:2**0': 0.21; 'feb': 0.22; 'header:In-Reply-To:1': 0.22; 'helpful': 0.23; 'received:209.85.212.46': 0.23; 'received:mail- vw0-f46.google.com': 0.23; 'traceback': 0.24; 'cc:2**0': 0.25; 'code': 0.25; 'pm,': 0.26; 'looks': 0.27; 'message- id:@mail.gmail.com': 0.28; 'odd': 0.28; 'script.': 0.28; 'problem': 0.29; 'cc:addr:python.org': 0.29; 'class': 0.29; '(and': 0.29; 'lines': 0.30; 'offending': 0.30; 'preceding': 0.30; 'typeerror:': 0.30; 'chris': 0.30; 'received:209.85.212': 0.34; 'last):': 0.34; 'run': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'why': 0.39; "what's": 0.39; 'called': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'might': 0.40; 'type': 0.60; 'skip:\xc2 10': 0.74; '1:00': 0.84; 'owen': 0.84; 'russell': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ucsd.edu; i=crebert@ucsd.edu; q=dns/txt; s=041709-iport; t=1328135759; x=1359671759; h=mime-version:in-reply-to:references:date:message-id: subject:from:to:cc:content-transfer-encoding; bh=B+96ywBSTrWQpQWfPhXlxWtJkAz6Hgw/MdL68E5/s9E=; b=p9ofeVahI1ColNjd7wDYWQCZcVG84rePh4o8rRR5TGxlrwol2Odkmq2l EJ/Grxe6qYeJcR/kACN0ED6lKmXLSCUw9IRDYS6Dj4WmChGFtw2L3sD3t yucDgpoudXrp0unsiS/1MN38YL/xvsc95xXs90eg1rvGReisykkQnRXkE E=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArAFAKC8KU+E7/kU/2dsb2JhbABDDoR9qW8IgQWBcgEBAQEDEgIPVhAJAgsNAgImAgIiEgEFARwGEwgaonsKiyaIXokFgS+KGQcCAgIIAQEEDQMTAQgFAwMJBQwCDIJ/CIEUgk2BFgSIQYxghUSIUz2DSVg X-IronPort-AV: E=Sophos;i="4.73,341,1325491200"; d="scan'208";a="709165274" X-Spam-Status: No X-Spam-Level: MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 1 Feb 2012 14:34:45 -0800 Subject: Re: Generator problem: parent class not seen From: Chris Rebert To: "Russell E. Owen" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1328135760 news.xs4all.nl 6948 [2001:888:2000:d::a6]:57867 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19745 On Wed, Feb 1, 2012 at 1:00 PM, Russell E. Owen wrote: > I have an odd and very intermittent problem in Python script. > Occasionally it fails with this error: > > Traceback (most recent call last): > =C2=A0File > "/Applications/APO/TTUI.app/Contents/Resources/lib/python2.7/TUI/Base/Bas > eFocusScript.py", line 884, in run > =C2=A0File > "/Applications/APO/TTUI.app/Contents/Resources/lib/python2.7/TUI/Base/Bas > eFocusScript.py", line 1690, in initAll > TypeError: unbound method initAll() must be called with BaseFocusScript > instance as first argument (got ScriptClass instance instead) > The code looks like this: > > =C2=A0 =C2=A0def run(self, sr): > =C2=A0 =C2=A0 =C2=A0 =C2=A0try: > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.initAll() > I am puzzled why Python thinks the class type is wrong, given the output > of inspect.getclasstree. Any ideas on what might be wrong and how to > track it down (and why it would be so intermittent)? What's the offending line of initAll() [#1690 in BaseFocusScript.py] look like? The lines preceding it would also be helpful for context. Cheers, Chris