Do you think it would be possible for you to send me the script / model privately? I'd be happy to debug, and ensure that this will continue to work as it did before.
For whatever reasons NaNs were encountered during the simulation. That definitely should not happen, especially if it works with the GUI.
If you want to o debug yourself, maybe you could set a breakpoint before the 2nd
run_time_course and instead call open_copasi(), this will open the model in the GUI, and you should be able to see what went wrong, or at least verify that the GUI behaves the same.
best
Frank