I'm using boost::python to embed python, this is how I do it:
void runCode(){
Py_Initialize();
//boost::python code goes here and embedded python code runs
Py_Finalize();
}
it runs nicely for the first time, but when it is run again, I get this error:
LookupError: unknown encoding: utf8
and code does not run as expected, any help is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…