When accessing a Script Deployment via Script, the above error encountered.
Solution
This error occurs when the Script and the Script Deployment is from 2 different bundles. Scripts can only access other Scripts or Script Deployments on the same bundle.