Missing object chunks error for compiled .ghpy

Needs some expert help on this one. I’m compiling .ghpy using the method @piac described in his post. I’ve deleted irrelevant codes in the uploaded example but this def Write(...) of mine is causing trouble. I’ve isolated it after deleting and recompile for various times.
The compiled component cannot be deleted once dropped onto canvas. If i save a .gh file with this component in it, next time it opens, it will give me a GH IO error dialog


it’s as if my def Write(...) method messed up how the component would be initiated in GH scope.Like GH loses reference to it immediately and I can’t even delete it from canvas. What did I code that is screwing things up?
example.py (6.9 KB)

Are you overwriting a built in Write method ?!? Ie does it work if you rename it ?

1 Like

Well indeed.
Was not aware of this
On this topic tho, when I use def __init__(self) sometimes it still runs the super and inherits properties. I often assume that if I def a method that is already in parent class, it would just “append” to it somehow…Is it because __init__() is treated differently? Or maybe the inherited ones I’ve encountered are really created as class properties and not instance properties…

I think you always need to explicitly call the parent method when you overwrite it unless you have some decorator magic

2 Likes