error return without exception set
Peter Otten
__peter__ at web.de
Tue Jul 3 14:01:22 EDT 2007
Will McGugan wrote:
> Can anyone suggest a likely cause for the following exception...
>
> Exception exceptions.SystemError: 'error return without exception set'
> in <generator object at 0x0345CF30> ignored
The "Exception ... ignored" part is probably caused by an exception in a
finally block during garbage collection:
>>> def f():
... try:
... yield 42
... finally:
... 1/0
...
>>> g = f()
>>> g.next()
42
>>> del g
Exception exceptions.ZeroDivisionError: 'integer division or modulo by zero'
in <generator object at 0x401d2fec> ignored
The "error return without exception set" part looks like a failed
consistency check in ceval.c -- perhaps caused by a broken extension
written in C.
But you'd have to give some more context.
Peter
More information about the Python-list
mailing list