Hey Specklers,
quick question regarding using SpecklePy and receiving commit_data that was pushed from ETABS.
For receiving commit_data the following code lines are used:
commit = branch_obj.client.commit.get(branch_obj.stream.id, branch_obj.commits.items[0].id)
transport = ServerTransport(branch_obj.stream.id, branch_obj.client)
commit_data = operations.receive(commit.referencedObject, transport)
For a commit pushed from Revit the result is readable. Printing the output we get:
Base(id: 15c6f5b25011410e78ed30af3f2c4e29, speckle_type: Speckle.Core.Models.Collection:Objects.Organization.Model, totalChildrenCount: 109)
However, when I do the exact same thing, but for information pushed from ETABS, I get the following error message:
commit_data = operations.receive(commit.referencedObject, transport)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\api\operations.py", line 61, in receive
return _untracked_receive(obj_id, remote_transport, local_transport)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\api\operations.py", line 88, in _untracked_receive
return serializer.read_json(obj_string=obj_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 313, in read_json
return self.recompose_base(obj=obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 367, in recompose_base
base.__setattr__(prop, self.recompose_base(obj=ref_obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 378, in recompose_base
base.__setattr__(prop, self.handle_value(value))
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 403, in handle_value
obj_list = [self.handle_value(o) for o in obj]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 403, in <listcomp>
obj_list = [self.handle_value(o) for o in obj]
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 417, in handle_value
return self.recompose_base(obj=obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 378, in recompose_base
base.__setattr__(prop, self.handle_value(value))
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 403, in handle_value
obj_list = [self.handle_value(o) for o in obj]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 403, in <listcomp>
obj_list = [self.handle_value(o) for o in obj]
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 417, in handle_value
return self.recompose_base(obj=obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 367, in recompose_base
base.__setattr__(prop, self.recompose_base(obj=ref_obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\serialization\base_object_serializer.py", line 358, in recompose_base
base.__setattr__(prop, value)
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\objects\base.py", line 381, in __setattr__
value = self._type_check(name, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\bsteinhagen\AppData\Roaming\Python\Python311\site-packages\specklepy\objects\base.py", line 438, in _type_check
raise SpeckleException(
specklepy.logging.exceptions.SpeckleException: SpeckleException: Cannot set 'SectionProfile.shapeType':it expects type 'typing.Optional[specklepy.objects.structural.properties.ShapeType]',but received type 'int'
Any help on why this may be? Is there something in ETABS which is throwing a SectionProfile.shapetype exception?
Thanks in advance.
Cheers,
Björn