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


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

Re: Generator problem: parent class not seen

Started byChris Rebert <crebert@ucsd.edu>
First post2012-02-01 14:34 -0800
Last post2012-02-01 14:34 -0800
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Generator problem: parent class not seen Chris Rebert <crebert@ucsd.edu> - 2012-02-01 14:34 -0800

#19745 — Re: Generator problem: parent class not seen

FromChris Rebert <crebert@ucsd.edu>
Date2012-02-01 14:34 -0800
SubjectRe: Generator problem: parent class not seen
Message-ID<mailman.5326.1328135760.27778.python-list@python.org>
On Wed, Feb 1, 2012 at 1:00 PM, Russell E. Owen <rowen@uw.edu> wrote:
> I have an odd and very intermittent problem in Python script.
> Occasionally it fails with this error:
>
> Traceback (most recent call last):
>  File
> "/Applications/APO/TTUI.app/Contents/Resources/lib/python2.7/TUI/Base/Bas
> eFocusScript.py", line 884, in run
>  File
> "/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)
<snip>
> The code looks like this:
>
>    def run(self, sr):
>        try:
>            self.initAll()
<snip>
> 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

[toc] | [standalone]


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


csiph-web