Deployment - Client Side Serialize Error

Hi

Am new to Concrete, I am trying to test a deployment on 2.5 setting up the client / server.
Following Deploy | 2.5 | Concrete

It works fine if the curcuit I create only has one argument (like the exmaple) but if it has more than one (I have a tested and compiled curcuit locally and it works fine when testing with 3 arguments) I hit an issue at this stage::

arg: fhe.Value = client.encrypt(0, 2, 4)
serialized_arg: bytes = arg.serialize()

This throws an error of:
serialized_arg: bytes = arg.serialize()
^^^^^^^^^^^^^
AttributeError: ‘tuple’ object has no attribute ‘serialize’

Is this a bug and I should raise a github issue or am I doing something wrong when trying to encrypt on the client side with 3 seperate integers? Any help appreciated.

Hi @DaveCT,

client.encrypt(0, 2, 4) returns a tuple like this (Value, Value, Value) and each Value has serialize method. So what you can do is:

args: Tuple[Value, Value, Value] = client.encrypt(0, 2, 4)
serialized_args: List[bytes] = [arg.serialize() for arg in args]

Hope this helps!

1 Like

Perfect, that got me back on track. Thanks very much.

1 Like