SEP doesn't have a script blocking feature, however, you can use ADC to do that if you wanted to.
If you believe SEP is the issue, temporarily disable and test again to see if the error re-occurs.
Just do you know, ADC has a rule to block scripts but it's unchecked in the default policy.
It's called "Block access to scripts [AC7]"
It's blocks file with an extension of .bat, .reg, .vbs, or .cmd