Execute a script via a button

What is the exact error?

I must have missed the closing bracket when I copied it from my plusing. I updated the post. It is the exact function I use for multiple plugins and I’ve never had it give an error.