Import utility, object, and view error


Just updated to Rhino 5.4 on my Mac and now I get module not found errors for utility, view, and object. Not really sure if the update caused the error, but this code has worked in the past.

Here’s the top of my code:

#!/usr/bin/python -tt

import Rhino
import scriptcontext
import System.Guid
import re
import math
import time
import sys

import System.Windows.Forms.DialogResult
import System.IO.File

import utility as rhutil ““MODULE NOT FOUND””“
import object as rhobject ““MODULE NOT FOUND”””

from scriptcontext import doc

import Rhino.UI
import rhinoscriptsyntax
import System.Drawing.Color
import System.Enum
import System.Array
import System.Windows.Forms
from view import __viewhelper ““MODULE NOT FOUND””"

import os

Any help is appreciated.

(Alain Cormier) #3

Sorry, I missed this post.

From your scripts

import rhinoscriptsyntax as rs

is the most common way to import everything you need from rhinoscriptsyntax

For individual modules:

import rhinoscript.utility as rhutil
import rhinoscript.object as rhobect
from rhinoscript.view import __viewhelper



Thank you! That did the trick.