Python script crashing Rhino 5.1 & WIP

I have a script I have been running for a while, like months at least. Yesterday it crashed Rhino at least 3 times, while working at home. I tried the script here at work and it crashed Rhino again. The script lets me go through most of the steps, it was only when I tried to “place” the text output, that Rhino crashed.

I commented out 2 lines at the end of the script that was adding the text to Notes in Rhino. It runs now, so something about adding to Notes?

Rhino script for finding weight of object and adding File information, mostly by Mitch Heynick
# -*- coding: utf-8 -*-

import rhinoscriptsyntax as rs
import scriptcontext as sc
import datetime, time;  # This is required to include time module.
import Rhino

def CalculateObjectPrice():
unitsFactor = .001

'''Change Text Height

1.25 for pendants & rings
0.75 for pops'''


objs=rs.GetObjects("Select Objects for volume", filter=16, group=True, preselect=False, select=True)
if not objs: return
for obj in objs:
	if rs.IsObjectSolid(obj):
		if vol:
#bail if there is 0 volume
if totalV==0: return

#create an empty dictionary
#fill the dictionary with entries
#NO SPACES in material names for GetString!

#can add as many more as you want

#gets a list of all the dictionary keys (not ordered!)
#sorts the list for easier reading in next step

#Get a string from the command line
mType=rs.GetString("Select Metal Type",strings=metaList)
if not mType: return
if not densDict.has_key(mType):
	print "Invalid material type!"

#price = rs.GetReal('Price of '+mType+', per gram')
#if not price: return

#get the density corresponding to chosen metal from dictionary
#Calculate total weight of object(s)
grams = totalV * unitsFactor * density

# you are removing 15%?
finished = round((grams - (grams * .15)), 3)
amount = round((finished), 2)
grams=round(grams, 3)

text = rs.EditBox(message="Enter Gem, Enamel & or Clay info")

designer = raw_input('Enter Designers Initials: ')
fileBy = raw_input('Enter Rhino Done By Initials: ')
build_for = raw_input('Enter Factory Name: ')

now ="(%d %B %Y)")

point = rs.GetPoint("Point for text insertion")
if point:
    #create your text string
textString='''Calculated {mType} Weight:
{grams} grams in Rhino
{finished} grams finished

Designer: {designer}
Rhino: {fileBy}
Factory: {build_for}
© JewelPop Inc. {now}
context = {




Just wondering if something has changed in the latest builds?

Here is script also to download. (2.6 KB)

I also have been having a lot of trouble with crashing when running Python scripts recently - sent in a bunch of crash reports… Sometimes after running scripts it also crashes silently on closing, when I re-open rhino the next time I get the crash report box…


This happened today after trying the script twice. Yesterday at home though, I never got the crash report on reopening Rhino.


Hi all,

Just to let you know that we are looking into this.


Happening agin here at home with the write to notes commented in the script.

I have tried with WIP & 5.1

Software information

Software versions
Rhinoceros version: 5.1 (5B161)
IronPython version: 5.1.2015.131
Language: en (MacOS default)
OS X version: Version 10.10.5 (Build 14F1021)


Third party kernel extensions
at.obdev.nke.LittleSnitch (4352)
com.digidesign.mbox2.boot.driver (10.3.5f211)
com.Greatdy.driver.SystemAudioCapture (1.0.0) (1.1.1)
com.copy.github.osxfuse.filesystems.copy_osxfusefs (2.8.0)

Hardware information

Computer hardware
Hardware model: MacPro2,1
Processor: Intel Xeon CPU 5150 @ 2.66GHz
Memory: 18 GB
Architecture: Intel 64 bit

Video hardware
Graphics: ATI Radeon HD 5770 1024 MB
Memory: 1024 MB
Screen size: 1680 x 1050, 1920 x 1200
Displays: Cinema (99dpi 1x), BenQ FP231W (98dpi 1x)

USB devices
Apple Inc.: iPhone
PixArt: DynexWired USB Optical Mouse
Apple Inc.: Apple Keyboard
Apple Computer, Inc.: Apple Cinema Display
Canon: CanoScan
Digidesign: Mbox 2

Bluetooth devices

OpenGL information

OpenGL software
OpenGL version: 2.1 ATI-1.32.25
Render version: 2.1
Shading language: 1.20
Maximum texture size: 16384 x 16384
Z-buffer depth: 24 bits
Maximum viewport size: 16384 x 16384

Implementation settings
Use texture compression: No

Appearance settings
Antialiasing: 0x
Mip map filtering: None
Anisotropic filtering: None