Generator problem: parent class not seen

Chris Rebert crebert at
Wed Feb 1 17:34:45 EST 2012

On Wed, Feb 1, 2012 at 1:00 PM, Russell E. Owen <rowen at> 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/
>", line 884, in run
>  File
> "/Applications/APO/
>", 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:
>    def run(self, sr):
>        try:
>            self.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]
look like? The lines preceding it would also be helpful for context.


More information about the Python-list mailing list