Comments (6)
from scriptcontext import doc
Is not a good thing to do in a separate module. Modules in python are loaded and executed once. This means that the doc variable will point to the correct doc the first time the module is run, but may be pointing to an incorrect doc when the module is run in the future. I would recommend always calling scriptcontext.doc instead.
from ghpython.
Thanks Steve.
also, I probably could have avoided this by calling RhinoDoc.ActiveDoc
instead of scriptcontext.doc
in my separate modules.
from ghpython.
I would avoid RhinoDoc.ActiveDoc if possible and always use scriptcontext.doc. Mac Rhino is a multi-doc application and the ActiveDoc can switch.
from ghpython.
Thanks Steve! will keep that in mind.
from ghpython.
Variable assignment (document switching) is something that should not be sticky between sessions in any way. Also, I just tried the steps described above now and nothing happens, so a first guess would be that the crash depends later from additional side effects in the script... it might be in different places.
Did you manage to isolate the provoking part in the script? If not, can you check if, after reducing the script to a minimum set of operations and restarting Rhino, the crash disappears?
from ghpython.
before I could find the steps to recreate it, I tried another reinstall of grasshopper in order to resolve it. That worked. I can switch target docs again.
Now I'll see if I can break it again.
from ghpython.
Related Issues (20)
- CustomPreview in ghpythonlib HOT 2
- User objects HOT 3
- Visualize major implied loops somehow for print in editor HOT 1
- components.SortList has lame output variable name HOT 1
- ghenv.Component.Exposure is read only HOT 3
- Grasshopper Errors should be raised as exceptions HOT 1
- Multiline strings wrapping with / will not highlight correctly
- Wish: Minimize GHPython Editor HOT 2
- Make __main__ importable HOT 2
- Script Editors don't show as disabled when closing clusters HOT 1
- Wish: Add Grasshopper libraries folder to default module paths read by GHPython HOT 10
- Compiling GHAs HOT 1
- No way to break/Ctrl-C out of python script HOT 2
- Accessing .ghuser clusters through node-in-code feature
- ghpython parallel bug with SurfaceMorph grasshopper function
- GHPython Some Bottlenecks (Bugs?) HOT 1
- SDK Grasshopper - Python HOT 1
- Slider Undo causes input param to temporarily not exist HOT 2
- Question: Call a function from within ghPython component from C# components HOT 1
- Issue importing python modules (AppKit)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghpython.