Ansible builtin expect fails with python error

The target uses /usr/bin/python3 on myhost is it 3.9 and does it have the correct version of pexpect installed?