Is the script called script.py? pyrevit will only run a file named like that
does the name of the folder in which you put the script end with .linkbutton? this is the suffix for running external dll commands
I’m afraid you can’t add logging for this kind of buttons, but you could try to CTRL+Click on the button to see the pyrevit runtime debug logging and see if it says something about loading the dll