issue #1700 replace PyExc_Exception