Wrong Units property when recieving stream in Python

Hi all,

I’ve send some Speckle Objects (Column in this case) made in Grasshopper to my Speckle Stream. I’m recieving this stream in Python to do some calculations on. In order to do the calculations I first have to check what the units are of the data I’ve sent to the stream. Now, my Rhino document is set to milimeters, my objects are in milimeters, everything is in milimeters. But for some reason my top level parent units attribute is set to ‘m’ in python (img. 1).

The units of the objects are set correctly to ‘mm’ though (img. 2).

Also, there is no units attribute when I check the stream on the web (img. 3).

SpeckleNoUnits

Any idea as to why the top level units are set to ‘m’ when I recieve this in Python?

1 Like

hey @Wes!

thanks for reporting and sorry for the inconvenience - Base objects used to always have a units prop on them but this was changed in speckle-sharp and not propagated to specklepy.

i’ve fixed this now and released a new version 2.7.2 which you can upgrade to now to resolve this!

note that because units validation works a bit differently in py, all Base objects will have a units property, thought it can be None (which is what should happen now!)