Marquee - API Image too large issue [solved]

Hello

I noticed a bug in the tidbyt API push method when pushing a custom image generated by Pixlet using a Marquee function.

When using a longer marquee message, the width must be reduced or you get the image is too large message. This rendered message views fine in Chrome but PUSHing to the device you receive the message:

Tidbyt API returned status 400 Bad Request
{“error”:“image is too large”,“code”:3,“message”:“image is too large”}

This code below does work - render and push fine:

load(“render.star”, “render”)
def main(config):
return render.Root(
render.Marquee(
width=64,
child=render.Text(“this will work!”, color=“#070”),
)
)

This will render properly but not push successfully

load(“render.star”, “render”)
def main(config):
return render.Root(
render.Marquee(
width=64,
child=render.Text(“this will not work12”, color=“#070”),
)
)

Edge case occurs if you remove the 2 in the “not working code”

Additionally, if you remove the 3 pixels from width, you can present the “this will not work12” string using the following code

This will work and push successfully

load(“render.star”, “render”)
def main(config):
return render.Root(
render.Marquee(
width=61,
child=render.Text(“this will not work12”, color=“#070”),
)
)

The longer the text gets, the shorter the width parameter has to become.

This makes the marquee unusable with longer strings at full width. Again it only exists when pushing through the API after rendering the script. Hosting Pixlet to chrome appears to work fine.

The “image is too large” message is vague, could mean size in bytes or dimensions? might be possible improvement.

Thanks for considering this bug if it has not been discovered yet. I know app development is still beta.

You’re correct, that error message is too vague. It’s the size in bytes of the image that’s the issue. We had that set to a fairly conservative maximum size since we originally didn’t support animations, but I just bumped it up. If you try again in a few minutes it should work.

Hi Rohan

This resolved the issue! Great work!
This makes the marquee much more useful now as I can use 64 pixels and a long message.

Thanks for the fast turn-around