specklesystems / specklepy

Python SDK 🐍
https://speckle.systems
Apache License 2.0
110 stars 39 forks source link

Bug: Unable to re-run script after creating a class that inherits from base #359

Open cslotboom opened 19 hours ago

cslotboom commented 19 hours ago

When inheriting from base, I am unable to run a script twice without getting a value error my custom class. Looks like some persistent global registry object isn't getting properly refreshed on each run?

I'm creating the object below, and I get this error when running twice:


class PointGroup(Base, speckle_type="UserObject"):

    def __init__(self, points:list[Node], lines:list[Element2D] = None):
        self.points = points
        self.lines = lines

image

System Info

WIndows 11, specklepy = 2.21

linear[bot] commented 19 hours ago

CXPLA-130 Bug: Unable to re-run script after creating a class that inherits from base