Puzzled by GH Python : updating code

Hi all,

Sometimes it seems the python component doesn’t update at all. In most case, the component works properly, but sometimes it works very oddly.

Here is the case :

In Grasshopper Python Script Editor, I wrote a code, and test it and it returned error like below:


Runtime error (IndexOutOfRangeException): index out of range: 66
Traceback:
line 42, in script
line 73, in jigsaw, “”

Then I deleted the lines, for instance, every line below line 42, but it still returned same error even if lines didn’t exist anymore. I guessed the code line still existed in memory.
So I tried to clear all data(grasshopper menu>solution>clear), but it didn’t improve.

Whenever this problem happens, I simply exit Rhino and Grasshopper and run again. I guess there should be a better way to deal with this problem. Is there any way to update the code immediately when this problem happens?

Did you save before re-execute?

Thank you for the comment.
Yes, I saved and re-execute, but nothing changed.

Hi @lepli,

did it ever happen again?
I wonder what type of code you are writing: is it only related with geometry? Can you give a sample?
At best, you would be able to make a small video.

Can you just quickly check that you are using the latest versions of GhPython, GH and Rhino? (0.6.0.3, 0.9.0.76 and SR 12 or SR13, respectively).
Thanks,

Giulio

Hi Piac,

Sorry for late response. I just find your comment today. I will check my script and get back to you soon.

Thanks,

PJ

1 Like