I get this error when i try to run remote.send scripts through my RM4 pro (SOLVED)

Hello guys! I’m running my HA at least a year now on a Debian thin client i got at home, and basically a week ago i brought an RM4 pro. I’m using the Broadlink integration, took my time to learn the button commands, i made a great button card on lovelace, but all of a sudden today i woke up to see that things not working properly anymore (i did the last update 3 days ago and things worked normally without any issues).

I restarted core, then the whole host, without any luck, i even deleted the integration and re-added the device on my system, then i got back to scripts and changed the device to the new one.
So i tried to run the script manually and what i get is this error. Does anyone have any idea what exactly is wrong? (am getting the same error about the line 51 whichever script i’m trying to run)

The same day i just found out that there was a comma after the last device’s codes