Python carousel brack on messenger

In the python.py file I added the following code.

But I getting this response on messenger.

What exactly the problem is?

Thanks in advance.