Most likely that’s due to your Aseprite version being too old and not supporting the necessary Lua API. If you’re able to, try updating to at least Aseprite v1.2.30, or best to v1.2.40.