cdebug << pthread_self() << "PyEval_CallObject method beginning : " << Name() << endl ;
// Result = PyEval_CallObject( MyPyRunMethod , ArgsList ) ;
Result = _OutNode->SuperVisionContainer()->ActivatePythonExecution( MyPyRunMethod , ArgsList ) ;
- MESSAGE( pthread_self() << "PyEval_CallObject method finished." );
- cdebug << pthread_self() << "PyEval_CallObject method finished." << endl ;
+ MESSAGE( pthread_self() << "PyEval_CallObject method finished. Result " << Result );
+ cdebug << pthread_self() << "PyEval_CallObject method finished. Result " << Result << endl ;
cdebug_out << "Executor::InNode::PyEvalCallObject " << Name() << endl ;
} catch( ... ) {
- MESSAGE( pthread_self() << "ERROR: Exception caught PyEval_CallObject Python method." );
- cdebug << pthread_self() << "ERROR: Exception caught PyEval_CallObject Python method."
- << endl ;
- MESSAGE( " Python was reinitialized. Previous Python definitions are lost Py_IsInitialized " << Py_IsInitialized() );
+ MESSAGE( pthread_self() << "ERROR: Exception caught PyEval_CallObject Python method. Result " << Result );
+ cdebug << pthread_self() << "ERROR: Exception caught PyEval_CallObject Python method. Result "
+ << Result << endl ;
+// MESSAGE( " Python was reinitialized. Previous Python definitions are lost Py_IsInitialized " << Py_IsInitialized() );
//JR ===> fatal error in python : no current thread
// Py_Finalize();
// Py_Initialize();
// Automaton()->PyInitModule( false ) ;
// Py_InitModule( "InitPyRunMethod" , MethodPyRunMethod );
// _OutNode->PyInitialized( false );
+ if ( Result == NULL ) {
+ Kill() ; // Reset of _ThreadId
+ }
cdebug_out << "Executor::InNode::PyEvalCallObject ERROR catched " << Name()
<< " Py_IsInitialized " << Py_IsInitialized() << endl ;
}