EditPythonScript initialization error

I am automatically closing Grasshopper/Rhino8 after I run a process in Grasshopper

I just manually jogged through the whole definition and I identified that a Python concave hull script is the source of the issue. I can see it uses the old version of Grasshopper Python. I’ve tried to update it but my scripting/python knowledge is laughable.

image

I’ve added a Grasshopper script which contains the problem script and the process I use to close Grasshopper. It’s activated by the boolean toggle which should show the error. Can anyone help me with this I am completely stuck.

Isolated_Script error test.gh (17.1 KB)