[issue32799] <class 'contextlib._GeneratorContextManager'> returned a result with an error set

Eli Ribble report at bugs.python.org
Thu Feb 8 10:28:27 EST 2018


New submission from Eli Ribble <junk at theribbles.org>:

We've had about 200 occurrences of this error in various parts of our code. I have captured stack traces using sentry so I may be able to provide more detail if requested. The ultimate problem is that a SystemError is raised from within contextlib. The message of the SystemError is:

"<class 'contextlib._GeneratorContextManager'> returned a result with an error set"

The code, according to sentry, that is emitting this error is:

python3.6/contextlib.py in helper at line 159
            <cleanup>
    """
    @wraps(func)
    def helper(*args, **kwds):
>        return _GeneratorContextManager(func, args, kwds)
    return helper

I'm reporting this bug primarily because of the documentation at https://docs.python.org/3/library/exceptions.html#SystemError and I'm using CPython

----------
components: Library (Lib)
files: Screen Shot 2018-02-08 at 8.28.00 AM.png
messages: 311836
nosy: EliRibble
priority: normal
severity: normal
status: open
title: <class 'contextlib._GeneratorContextManager'> returned a result with an error set
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47430/Screen Shot 2018-02-08 at 8.28.00 AM.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32799>
_______________________________________


More information about the Python-bugs-list mailing list