After 23 attempts, failed to spawn pexpect session

ello All,
we are trying to copy NXOS image using ansible
getting this error when we ran the playbook form the AWX
anyone please help what is causing this issuefatal: [switch]: FAILED! => {
“msg”: “After 23 attempts, failed to spawn pexpect session to switchBEFORE: None, AFTER: None”
}this is the the configuration

  • name: COPY_NXOS_IMAGE_USING_SCP
    nxos_file_copy:
    file_pull: True
    local_file: “{{new_nxos_image}}”
    remote_file: “/root/networkscript/nexus-image/{{new_nxos_image}}”
    remote_scp_server: “{{scp_server}}”
    remote_scp_server_user: “{{scp_server_username}}”
    remote_scp_server_password: “{{scp_server_password}}”
    vrf: “management”
    timeout: 600
    vars:
    ansible_command_timeout: 30

when: ansible_network_os == ‘nxos’

Thank you
Suneel