"XXX undetected error" in python_d.exe

Mark Hammond mhammond at skippinet.com.au
Fri Dec 14 05:59:10 EST 2001

Courageous wrote:

> How am I supposed to interpret this error when it is printed
> by the Python interpreter? 

It generally means that someone has previously set an exception and not 
cleared or propagated it.

For example, the following code could cause it:

   PyObject *ob = PyObject_GetAttrString(a,"whatever");
   if (ob==NULL) {
     return Py_None;

The GetAttrString() call sets an exception, but the function returns an 
object.  In some cases this could trigger the above message.

These are hard to debug - the message is often not printed as the error 
is left pending - it is often quite stale by the time the warning is 
printed.  The frame location as it is printed can give you a hint though.

Finding it hsa always been pure grunt :(

> This appears to be a feature of newer (2.2?) interpreters in
> debug build only.

I believe debug only, but pre 2.2.  I think 2.0 at least, but maybe only 


More information about the Python-list mailing list