OpenHeadless change from SR24 to 25

Since updating Rhino 8 to SR 25 Rhino.RhinoDoc.OpenHeadless sometimes fails and returns None instead of a RhinoDoc instance.

I’m using IronPython nodes in Grasshopper v1.00.8

On SR24 everything was working as expected but since SR25 I sporadically get the object expired during a solution error (see attached screengrab)

The code I’m using is:

assert os.path.exists(this_file_path)

this_file = Rhino.RhinoDoc.OpenHeadless(this_file_path)

assert this_file

If I replug the inputs and rerun a couple of times it works, but it is erratic.

I cannot share the models I’m using right now but wanted to check if anybody else is experiencing this.

Regards,

Iván