I am working on a simple Speckle importer in Python. I would like to retrieve the base object from a Rhino Speckle commit with the following code snippet:
client = SpeckleClient(host="https://speckle.xyz/")
account = get_default_account()
client.authenticate_with_token(token=account.token)
transport = ServerTransport(client=client, stream_id="########") #stream_id hardcoded for testing
commit_id = "##########" #last commit from Rhino hardcoded for testing
commit = self.client.commit.get(self.streamId, commit_id)
referenced_obj = commit.referencedObject
res = operations.receive(obj_id=referenced_obj, remote_transport=transport)
The last line gives me the following error:
SpeckleException: SpeckleException: Cannot set ‘Brep.displayValue’: it expects type ‘Mesh’, but received type ‘list’
At:
...\specklepy\objects\base.py(287): _type_check
...\specklepy\objects\base.py(203): __setattr__
...\specklepy\serialization\base_object_serializer.py(323): recompose_base
...\specklepy\serialization\base_object_serializer.py(358): handle_value
...\specklepy\serialization\base_object_serializer.py(344): <listcomp>
...\specklepy\serialization\base_object_serializer.py(344): handle_value
...\specklepy\serialization\base_object_serializer.py(323): recompose_base
...\specklepy\serialization\base_object_serializer.py(265): read_json
...\specklepy\api\operations.py(89): receive
note: I also have a simple exporter in Python. When I push a simple cube from the standalone exporter I am then able to retrieve the base object from that commit using the code above. Could you give me some pointers to help me understand the problem better?
thanks for the help in advance