LanguageNotReadyException

Hi everyone.

I make a small jewelry kit for Rhino. It was great in Rhino 6 and 7. I just tried releasing for Rhino 8. It works fine on my PC, but the first person to buy it got this error when he tried running the installer script, he gets this error.

Rhino.Runtime.Code.Languages.LanguageNotReadyException: Language “IronPython 2.7.12 (mcneel.ironpython.python)” is not ready at Rhino.Runtime.Code.Code.CompileTryFinally(BuildContext context) at Rhino.Runtime.Code.Code.ExecTry(RunContext context, IPlatformDocument& doc, Object& docState) at Rhino.Runtime.Code.Code.Run(RunContext context)

He has version 8.5.2 which is what I had and it worked fine (previous Rhino 8 versions did NOT work fine, though).

And the “installer” script probably sounds more than what it is. It is a python script (with custom ETO forms) that lets the user choose a drive to unzip the kit’s zip file onto. Then it creates several aliases in Rhino so that they can use the various scripts. It’s not a full-blown plug-in or anything, just a python script.

Does anyone know what this error means? Or what I can do, if anything, to help him be able to use my kit (fortunately it’s cheap and he can still access the gem models and materials so he is happy enough, but I’d still like to help him if I can)

If it becomes necessary to see my script, I can provide that if needed.

Thanks in advance.

Hi @webdunce

  • How are you sharing the script? Sending the customer a script file?
  • How are they running the script? In the new script editor or using RunPythonCommand?
  • Would it be possible to upgrade to 8.6 or 8.7RC and test?
  • Would it be possible to ask customer to run RhinoCodeLogs command and share all the contents?

The error means that the customer has not initialized the languages yet. Rhino should always initialize the language environments automatically so this error should not happen.

Hi Ehsan,

They download the script from cgtrader.com. And I instruct them to click on Tools > Script > Run and then select the script (which I did just now and, surprisingly, it seems to start a command called ScriptEditor). I will ask if they are willing to upgrade and/or run the logs command and share the contents.

And thank you for explaining what the error means. I googled it and there was zero information about that error. It helps me know it’s probably not my script causing the problems.

1 Like

Absolutely. I’m here any time if you have more information. Does your script run with Python 2 or 3?

I start the script off with this comment #! python 2. I think that means I’m asking it to use python 2, right? I originally wrote my scripts in Rhino 7, and before the 8 SR5 update, including that comment seemed like the only way to get them to work.

I just tested it now without the python 2 comment, and it seems to work fine. Do you think it would be better for me to remove the python 2 comment?

Also, is it right for Tools > Script > Run to run the ScriptEditor command? Because that is what it does, but I really thought it would run the RunPythonScript command.

1 Like

Hello!! I just downloaded your file and have run into the same problem myself, but I’ve fixed it, at least it works for me!! What I did was instead of running it from Tools > Script > Run, I did, Tools > Script > Edit, then added the scrip there, and pressed run, and it worked!! Hope it helps, also, I have the free version of the script and have googled the problem only to figure out how to solve it 2 minutes later, haha!! Have a great day and please do tell me if it does work the way it did for me! :smiley:

That’s interesting. I think I see your user name over at cgtrader, I will contact you there. I would like you to test a modified installer script for me, if you’re willing to.

It’s cool that using the editor worked for you. Thank you for telling me about it.

No I would keep that #! python 2. In Rhino 8 and above we have more than one python version now so it is good to be specific about the version required for your script

1 Like