Script fails after playing media

I’m trying to set up a script so I can play a shuffled playlist on a Lyrion server that skips past the first track but the script fails after loading the media.

https://www.codedump.xyz/yml/aoG4TITud7mNLULj

I’m not sure what that means, but have a pleasant day then.