MIT app companion disconnect on error issue

Hi, I am a Wiingy student who is currently trying to create a Bluetooth controlled car, but problem is when I connect my custom made app to my iPad, my laptop shows this.


I couldn't figure out the error so can someone please help me?
here is the entire code:

Thanks a lot.

search 'irritants' in the community

thanks a lot!