Interesting - error occurred during installation. This doesn’t show up unless you close and reopen the editor.
Also made a quick video showing things (pardon the garbage gate setting on the audio): Rhino 8 WIP Python Not Installing - 2021-11-16 - YouTube
Would you mind opening the logs from Tools menu and DM me all the text in there?
For those playing at home, I’ve sent @eirannejad the log output, but it looks like things might be choking on the fact that there’s a space in the directory path for my home directory. Just waiting to hear if that’s a correct interpretation or I’m horribly wrong.
Yup. Home directory is
C:\Users\Jason Gillman\... that has a space in the middle I will fix the code to wrap the paths so spaces aren’t an issue.
Logges as RH-66372
Update: Fixed and pushed but I’m not sure if it is going to show up in today’s release. If not it’s gonna be in next weeks’
Thanks for the quick work. So WIP releases go out on Tuesdays then?
I’m pretty sure. Your Rhino WIP will notify you of releases
Well, glad I could help get the issue identified and resolved earlier rather than later!
3 posts were split to a new topic: Lisp Programming Language
- Using the Format command on a Python file in the Rhino Code Editor has unexpected consequences. It turned:
ignore_colors = False # Set to True to minimize memory usage.
ignore_colors = (
…False # Set to True to minimize memory usage.
The python script still executes but it is no longer tidy for reading.
It seems as though Format is applying what makes sense for C# type formatting to the Python script. What I really want is my own formatting with all tabs and no spaces at the start of lines like what I could do in Rhino 7 Python Editor.
The Format command turns all my tabs into spaces so that there are no more errors when I add lines. Well mostly no errors. I find that the code completion monitoring can cause typing results not to show on the screen for over 5 sec and then it sometimes does not ever restart and I have to kill and restart the Rhino Code Editor. This happened when I was typing: print(‘Select file’) → it hung up before I could finish typing the rest of the ‘Select file’ string. Is there a way to turn off command completion? I mostly do not need it and currently it makes editing so painful that I use the old Rhino 7 Python Editor instead. Then I copy and paste into the Rhino Code Editor for execution in Rhino 8 WIP.
The message area at the bottom is now scrollable which is very good.
The Rhino Code Editor now almost fits in the Rhino Window when it first comes up. It is still about 10% too tall. Again this only occurs on the native laptop screen not when I am using my external 42" Display.
So nice progress. Thanks for your work on the Rhino Code Editor.
Release Notes (8.0.21321.4306)
- Closed RH-66280. RhinoCode now has language options. Diagnostics can be toggled through this options window for each language independently. More language-specific options to be added to this window later. See “Toggle Diagnostics” in Edit menu as well
I’ll update the language editor in the future so it has a better ui. Each option really has 3 states
Default: whatever the default setting is in editor
Checked: This will be stored in config file as user preference
UnChecked: This will be stored in config file as user preference
- Editor now focuses on diagnostic lines when clicked in the diags panel items
- Editor now can activate minimap
- CPython runtime now includes header files (necessary for some packages on macOS)
- CPython runtime directory changed from
cpython-X.X/3.X.X format to
python3.X-X.X. It’s simpler and shallower now
- CPython runtime config file is now called
config.json and does not include the version anymore. that is reflected in the directory name
~/.rhinocode now includes
logs/ for log files. Rhinocode logger will now dump logs and stack trace on dotnet fails with unhandled exception
- Rhino.Runtime.Code does not reference RhinoCommon anymore. This is to keep the api clean for future
- CPython now does not install packages every time the script is opened. It checks the script packages against what is already installed in the environment and caches this information during the session
- Welcome panel now shows a link to release notes
- Improved RhinoCode server and cli for upcoming vscode integration
- Editor now support converting indentation types. Closed RH-66341
- Editor now limits size to screen RH-66355
- Terminal panel on windows is now scrollable RH-66354
- Editor now has “Clear Terminal” command
- Other misc editor GUI cleanups
config.json write bug here RH-66394
Well, looks like I got things working with PyCharm, so that’s a plus!
So it appears that it doesn’t like type hinting.
Here’s the “script”:
import rhinoscriptsyntax as rs
import scriptcontext as sc
current_doc: Rhino.RhinoDoc = sc.doc
And this is the error it threw:
Obviously not liking the colon used to specify the expected type.
Also doesn’t seem to like the
-> for specifying method return types:
def increment_hsv(rgba, inc_amt) -> System.Drawing.Color:
Increment the Hue degree and return the new System.Drawing.Color object
:param rgba: The current object
:param inc_amt: The amount to increase the hue
temp_hsv = Rhino.Display.ColorHSV(rgba)
current_hue = temp_hsv.H
temp_hsv.H = current_hue + inc_amt
Looks like you are running the code with the old IronPython engine. Instead use RhinoCode to run your script.
Ahh, ok, I was under the impression that
RunPythonScript used cpython as well.
There is a way to run the code from PyCharm via OS command-line in Rhino, but I forgot how. @eirannejad will tell you the spell to cast, I am sure.
Based on what I’m seeing for the available signatures, I’m guessing it’s not liking
def RealBox(message="", default_number=None, title="", minimum=None, maximum=None):
"""Display a dialog box prompting the user to enter a number
message (str, optional): a prompt message.
default_number (number, optional): a default number.
title (str, optional): a dialog box title.
minimum (number, optional): a minimum allowable value.
maximum (number, optional): a maximum allowable value.
number: The newly entered number on success
None: on error
import rhinoscriptsyntax as rs
radius = rs.RealBox("Enter a radius value", 5.0 )
point = (0,0,0)
rs.AddCircle( point, radius )
if default_number is None:
default_number = Rhino.RhinoMath.UnsetValue
if minimum is None:
minimum = Rhino.RhinoMath.UnsetValue
if maximum is None:
maximum = Rhino.RhinoMath.UnsetValue
rc, number = Rhino.UI.Dialogs.ShowNumberBox(
title, message, default_number, minimum, maximum
def ShowNumberBox(title: str, message: str, number: System.Double, minimum: float, maximum: float) -> typing.Tuple[bool, System.Double]: ...