Grasshopper System.IO.IOException error: The directory name is invalid

I suddenly got an error on opening Grasshopper that:

External file loading failed. Grasshopper may not run correctly after this.
System.IO.IOException: The directory name is invalid.

With further details as in this image:

On closing this, Grasshopper opens, but none of the plugins load, and the palettes are all empty:

And if I try to load a GH file, it can’t recognize any components
Unrecognized Objects

I have tried getting rid of any .gha files anywhere besides for the Libraries folder, restarting my computer, repairing Rhino, and reinstalling Rhino, all to no avail.

This error seems to have come about when I was having issues with a conda environment (accidentally uninstalled compas_fab while trying to uninstall and reinstall pyserial, tried to revert to a previous revision, but files were missing, etc.).

Is it possible that conda environment issues could have messed up grasshopper? I have since deleted the messed up environment and created a new one (with compas and compas_fab installed), still having the same issue.

Windows 10
Rhino 6

Let me know if you need any further info!

Wow, and of course as soon as you post, you figure it out!

In case anyone else has this problem, it does seem to be related to the compas and compas_fab python modules.

In the new environment I had created, the most recent versions had been installed (1.5.0 and 0.18.0 respectively).

I went back and downgraded these to the versions I had in my last working environment (1.0.0 and 0.16.0), and reran the python -m compas_rhino.install -p commands for connecting other python modules to Rhino. I also fixed a bad key error I had gotten with matplotlib during these commands by uninstalling and reinstalling matplotlib

After that I tried opening Rhino and GH again, and it worked! Not sure which one of the above fixed it.

In the future when trying to troubleshoot loading problems like that where you have many different plug-ins installed try the GrasshopperLoadOneByOne command to start Grasshopper.

Thank you, I will definitely try that if I have issues in the future! (Though hopefully this never happens again. It was painful.)