[Python-Dev] Fatal scoping error from the twilight zone

Ka-Ping Yee ping@lfw.org
Sat, 10 Feb 2001 16:22:48 -0800 (PST)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--8323328-1457723440-981850968=:4249
Content-Type: TEXT/PLAIN; charset=US-ASCII


Houston, we may have a problem...

The following harmless-looking function:

    def getpager():
        """Decide what method to use for paging through text."""
        if type(sys.stdout) is not types.FileType:
            return plainpager
        if not sys.stdin.isatty() or not sys.stdout.isatty():
            return plainpager
        if os.environ.has_key('PAGER'):
            return lambda text: pipepager(text, os.environ['PAGER'])
        if sys.platform in ['win', 'win32', 'nt']:
            return lambda text: tempfilepager(text, 'more')
        if hasattr(os, 'system') and os.system('less 2>/dev/null') == 0:
            return lambda text: pipepager(text, 'less')

        import tempfile
        filename = tempfile.mktemp()
        open(filename, 'w').close()
        try:
            if hasattr(os, 'system') and os.system('more %s' % filename) == 0:
                return lambda text: pipepager(text, 'more')
            else:
                return ttypager
        finally:
            os.unlink(filename)

produces

    localhost[1047]% ./python ~/dev/htmldoc/pydoc.py
    Fatal Python error: unknown scope for pipepager in getpager(5) in /home/ping/dev/htmldoc/pydoc.py
    Aborted (core dumped)
    localhost[1048]% 

with a clean build on a CVS tree that i updated just minutes ago.

I was able to reduce this test case to the following:

    localhost[1011]% python
    Python 2.1a2 (#20, Feb  3 2001, 20:40:19) 
    [GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
    Type "copyright", "credits" or "license" for more information.
    >>> def getpager():
    ...     if os.environ.has_key('x'):
    ...         return lambda t: pipepager(t, os.environ['x'])
    ... 
    Fatal Python error: unknown scope for pipepager in getpager (1)
    Aborted (core dumped)

but not before coming across a bewildering series of working and
non-working cases that left me wondering whether i was hallucinating.

Strange as it may seem, for example, replacing the string constant
'x' with a variable makes the latter example work.  Even stranger,
choosing a different name for the variable t can make it work in
some cases but not others!

Please try the following script and see if you get weird results:

    code = '''def getpager():
        if os.environ.has_key('x'):
            return lambda %s: pipepager(%s, os.environ['x'])'''

    import string, os, sys

    results = {}
    for char in string.letters:
        f = open('/tmp/test.py', 'w')
        f.write(code % (char, char) + '\n')
        f.close()
        sys.stderr.write('%s: ' % char)
        status = os.system('python /tmp/test.py > /dev/null') >> 8
        sys.stderr.write('%s\n' % status)
        results.setdefault(status, []).append(char)

    for status in results.keys():
        if not status: print 'Python likes these letters:',
        else: print 'Status %d for these letters:' % status,
        print results[status]

I get this, consistently every time!

    Status 134 for these letters: ['b', 'c', 'd', 'g', 'h', 'j', 'k', 'l', 'o', 'p', 'r', 's', 't', 'w', 'x', 'z', 'B', 'C', 'D', 'G', 'H', 'J', 'K', 'L', 'O', 'P', 'R', 'S', 'T', 'W', 'X', 'Z']
    Python likes these letters: ['a', 'e', 'f', 'i', 'm', 'n', 'q', 'u', 'v', 'y', 'A', 'E', 'F', 'I', 'M', 'N', 'Q', 'U', 'V', 'Y']

A complete log of my interactive sessions is attached.

I hope somebody can reproduce at least some of this to assure me
that i'm not going mad. :)



-- ?!ng

Happiness comes more from loving than being loved; and often when our
affection seems wounded it is is only our vanity bleeding. To love, and
to be hurt often, and to love again--this is the brave and happy life.
    -- J. E. Buchrose

--8323328-1457723440-981850968=:4249
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=scope-notes
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.10102101622480.4249@localhost>
Content-Description: 
Content-Disposition: attachment; filename=scope-notes

bG9jYWxob3N0WzEwMDFdJSBweXRob24NClB5dGhvbiAyLjFhMiAoIzIwLCBG
ZWIgIDMgMjAwMSwgMjA6NDA6MTkpIA0KW0dDQyBlZ2NzLTIuOTEuNjYgMTk5
OTAzMTQvTGludXggKGVnY3MtMS4xLjIgcmVsZWFzZSldIG9uIGxpbnV4Mg0K
VHlwZSAiY29weXJpZ2h0IiwgImNyZWRpdHMiIG9yICJsaWNlbnNlIiBmb3Ig
bW9yZSBpbmZvc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