verloop / twirpy

Twirp's python implementation
The Unlicense
99 stars 20 forks source link

fix: reading large messages #23

Closed batchar2 closed 3 years ago

batchar2 commented 3 years ago

// pb 
message Image {
    CameraId camid = 1;
    bytes img_base64   = 2;
}
# code 
img = Image(
    camid = CameraId(id=1),
    img_base64 = b'1' * 1024 * 100  # Sending a message of this length resulted in an error:
)
response = client.UpdateImage(ctx=ctx, request=img)

Error: Error

avinassh commented 3 years ago

@batchar2 Thank you for the PR!