CommunicationError : 2


#1

I’m trying to send base64 encoded string, but I get the next error :

Traceback (most recent call last):
  File "file.py", line 21, in <module>
        channel.send("IHsidmVoaWNsZSI6IjFmMDAyYTAwMGM0NzM3MzEzNjM0MzczOCIgLCAic3BlZWQiOjIxICwgInJvdXRlIjoiMTA4NiIgICwgImRhdGUiOiIyMDE4LTA0LTI0IDA3OjI5OjE1Ljc5MTEwOCIgLCAiYWx0aXR1ZGUiOiIxOS41MTU2NDQiICwgImxvbmdpdHVkZSI6Ii05OS4xMDQwMjcifQo=")
      File "helium_client/_helium.pyx", line 374, in helium_client._helium.Channel.send (helium_client/_helium.c:4581)
      File "helium_client/_helium.pyx", line 283, in helium_client._helium.Helium.poll_result (helium_client/_helium.c:3667)
      File "helium_client/_helium.pyx", line 120, in helium_client._helium._check_status (helium_client/_helium.c:2002)
    helium_client._helium.CommunicationError: 2 

The code is I’m using is :

`channel.send("IHsidmVoaWNsZSI6IjFmMDAyYTAwMGM0NzM3MzEzNjM0MzczOCIgLCAic3BlZWQiOjIxICwgInJvdXRlIjoiMTA4NiIgICwgImRhdGUiOiIyMDE4LTA0LTI0IDA3OjI5OjE1Ljc5MTEwOCIgLCAiYWx0aXR1ZGUiOiIxOS41MTU2NDQiICwgImxvbmdpdHVkZSI6Ii05OS4xMDQwMjcifQo=")` 

If I change the encoded string by a simple string (like “test”), there is no error.

Any idea what is causing the error ?

Thanks


#2

The max data size per send is 100 bytes. That is why a string like “test” succeeds and the long string fails.


#3

Got it. I notice that in my latest test. Thanks …