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