Hello,
I’ve spent a couple frustrating hours starting to learn ETO with Python3. I have gotten a grand total of zero example scripts to work! Not a good average.
From here:
I have tried these scripts with and got the following errors
SampleEtoCollapsibleDialog.py
NameError: name 'Padding' is not defined
SampleEtoDialog.py
NameError: name 'Dialog' is not defined
SampleEtoRebuildCurve.py
NameError: name 'Dialog' is not defined
SampleEtoViewports.py and SampleEtoViewCaptureDialog.py
Rhino.Runtime.Code.Execution.ExecuteException: Object reference not set to an instance of an object.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at Eto.Forms.Window.set_Title(String value) in D:\BuildAgent\work\dujour\src4\DotNetSDK\Eto\src\Eto\Forms\Window.cs:line 244
at InvokeStub_Window.set_Title(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of stack trace from previous location ---
at Python.Runtime.PythonException.ThrowLastAsClrException()
at Python.Runtime.PythonException.ThrowIfIsNull(NewReference& ob)
at Python.Runtime.PyModule.Execute(PyObject script, PyDict locals)
at Python.Runtime.RhinoCodePythonEngine.RunScope(Object scope, Object code, String pythonFile, String beforeScript, String afterScript)
at Rhino.Runtime.Code.Languages.PythonNet.CPythonCode.Execute(RunContext context)
at Rhino.Runtime.Code.Code.ExecTry(RunContext context, IPlatformDocument& doc, Object& docState)
at Rhino.Runtime.Code.Code.Run(RunContext context)
--- End of inner exception stack trace ---
System.NullReferenceException: Object reference not set to an instance of an object.
at Eto.Forms.Window.set_Title(String value) in D:\BuildAgent\work\dujour\src4\DotNetSDK\Eto\src\Eto\Forms\Window.cs:line 244
at InvokeStub_Window.set_Title(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of stack trace from previous location ---
at Python.Runtime.PythonException.ThrowLastAsClrException()
at Python.Runtime.PythonException.ThrowIfIsNull(NewReference& ob)
at Python.Runtime.PyModule.Execute(PyObject script, PyDict locals)
at Python.Runtime.RhinoCodePythonEngine.RunScope(Object scope, Object code, String pythonFile, String beforeScript, String afterScript)
at Rhino.Runtime.Code.Languages.PythonNet.CPythonCode.Execute(RunContext context)
at Rhino.Runtime.Code.Code.ExecTry(RunContext context, IPlatformDocument& doc, Object& docState)
at Rhino.Runtime.Code.Code.Run(RunContext context)
Am I missing some kind of secret decoder ring to make the examples work?
The Rhino version is Version 8 SR8
All of these scripts are 6 to 7 years old, so maybe I have just followed the documentation to the wrong location?
Thanks for the insight,
Henry