Sudo: no tty present and no askpass program specified

I am trying lxc-attach commands in lxc and getting this error. Was looking to find an answer on here but looks like you guys are coming up short too :(.

My initial command to run a python script within the container doesn’t need sudo however the script itself wants sudo for running openvpn. Maybe I will have to look into running openvpn as non sudo if there is no clear solution to this or just run as root.

How come you can sudo within the container normally but not via lxc-attach?