Using scripting in gh

Namaste All,
I am using a python package called decode in grasshopper and was trying to display the outcome in the rhino window but the following error is displayed :

" Runtime error (MissingMemberException): ‘GrasshopperDocument’ object has no attribute ‘CreateDefaultAttributes’ "

This is the code that I am trying to run :

import decodes
from decodes.core import *
outie = decodes.make_out(decodes.Outies.Rhino)
outie.put(Point(1,2))
outie.draw()

Here, I am able to run first and second line successfully.
“outie” is a translation object which we use to display and transport geometry to traditional CAD. but am unable to run it. Kindly help. Thanks :slight_smile:

I don’t think this is going to work inside Grasshopper, as the scriptcontext.doc import is wrong. It should be a RhinoDoc, but it appears that through the Python script component it is understood as a GrasshopperDocument.

I do not understand, are there things which I need to do before using this?

I am not a computer guy but is this " https://github.com/ksteinfe/decodes/blob/master/src/decodes/io/gh_out.py " of any use if I am to use that outie function?
I am stuck with this thing from quite some time now :frowning:

I remembered decodes only works with Rhino 5, at least when I was still in UCB… I don’t know if it’s the issue. :joy:

I use rhino 5.

Best is to ask the author of the library, imo.