Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19745
| References | <rowen-5B5D5C.13003901022012@news.gmane.org> |
|---|---|
| Date | 2012-02-01 14:34 -0800 |
| Subject | Re: Generator problem: parent class not seen |
| From | Chris Rebert <crebert@ucsd.edu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5326.1328135760.27778.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Generator problem: parent class not seen Chris Rebert <crebert@ucsd.edu> - 2012-02-01 14:34 -0800
csiph-web