Node-In-Code Issue on mac

When running this code to try and use Node-In-Code on rhino 7 mac:

import rhinoscriptsyntax as rs
import ghpythonlib.components as ghcomp

It works the first time the script is run after freshly opening rhino, but when run more then once throws this error:

Message: No module named GhPython.Assemblies
Traceback:
line 1, in <module>, "/Applications/Rhino 7.app/Contents/Frameworks/RhCore.framework/Versions/Current/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/RssLib/ghpythonlib/componentbase.py"
line 13, in <module>, "/Applications/Rhino 7.app/Contents/Frameworks/RhCore.framework/Versions/Current/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/RssLib/ghpythonlib/__init__.py"
line 2, in <module>, "/Users/tristanstudiopractice/Desktop/test_node_in.py"

Restarting rhino will make it work once again but after running the script more than once it gives the same error.
It seems as if node-in-code is broken on mac, and the same issue appears with the rhino 8 wip.
Thanks,
T

Hi @tristanryerparke1,

It looks like this is a known issue.

https://mcneel.myjetbrains.com/youtrack/issue/RH-61092

– Dale

I reported about it already half a year ago here!
Any hope for us?
Maybe some way to check if its loaded allready and use it somehow?
All I need is ghc.Kangaroo2Component.TriRemesh, but I have to shut down Rhino and load it again to launch my script with this import… its not a great fun!
I’m on Windows, not on Mac

I thought of using “sticky” to solve this issue somehow…
Of course this code does not work, but maybe someone from experienced developers will can help how to make it work.
Or is this complete nonsense and in this way the issue cannot be solved?

import scriptcontext as sc
try:
    import ghpythonlib as ghc
    sc.sticky["ghc"] = ghc
except Exception as e:
    ghc = sc.sticky["ghc"]
    print(e)