I will install Kodi v21 on a test machine and see if the script fails.
I managed to get the script to run successfully on Kodi v21-RC1 in Ubuntu (not LE or CE) without error. I had to fudge some of the addon validations, however, those sections have no impact on how the script actually operates.