I'm having trouble closing and then opening new Jep interpreters. Please see the following code
JepConfig jepConfig = new JepConfig();
jepConfig.setInteractive(false);
final boolean succeed = false;
Jep jep1 = new Jep(jepConfig);
jep1.eval("from datetime import datetime");
if (succeed)
jep1.eval("print(datetime.strftime(datetime.now(), '%Y-%m-%d'))");
else
jep1.eval("print(datetime.strptime('2017-10-01', '%Y-%m-%d').date())");
jep1.close();
Jep jep2 = new Jep(jepConfig);
jep2.eval("from datetime import datetime");
if (succeed)
jep2.eval("print(datetime.strftime(datetime.now(), '%Y-%m-%d'))");
else
jep2.eval("print(datetime.strptime('2017-10-01', '%Y-%m-%d').date())");
jep2.close();
It should be quite obvious what it does; the branch with `succeed=true` runs fine and outputs twice the current date, whereas the branch with `succeed=false` throws the following error
This feels like a bug with Jep since I would expect the instances `jep1` and `jep2` to have no bearing on each other since I'm not using any shared modules. Is this correct or am I just doing something wrong? If it is a bug, how can I work around this until it's fixed?