DX NetOps Upgrade Automation Pre-Flight Check Fails with "msg": "MODULE FAILURE: No start of json char found
search cancel

DX NetOps Upgrade Automation Pre-Flight Check Fails with "msg": "MODULE FAILURE: No start of json char found

book

Article ID: 386797

calendar_today

Updated On:

Products

CA Performance Management

Issue/Introduction

While running the DX NetOps Upgrade Pre-Flight Check, a task is failing with either of the below output:

[WARNING]: Unhandled error in Python interpreter discovery for host HOSTNAME: Expecting value: line 1 column 1 (char 0)
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SyntaxError: future feature annotations is not defined
[WARNING]: Platform linux on host HOSTNAME is using the discovered Python interpreter at /usr/bin/python3, but future installation of another Python interpreter could
change the meaning of that path. See https://docs.ansible.com/ansible-core/2.18/reference_appendices/interpreter_discovery.html for more information.


fatal: [HOSTNAME -> HOSTNAME]: FAILED! => {"changed": false, "module_stderr": "Shared connection to HOSTNAME closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1736455976.5469801-192-274383219028297/AnsiballZ_ping.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1736455976.5469801-192-274383219028297/AnsiballZ_ping.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1736455976.5469801-192-274383219028297/AnsiballZ_ping.py\", line 44, in invoke_module\r\n    from ansible.module_utils import basic\r\n  File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\r\n  File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\r\n  File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\r\n  File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\r\n  File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\r\n  File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\r\n  File \"/tmp/ansible_ansible.builtin.ping_payload_ppbj01l7/ansible_ansible.builtin.ping_payload.zip/ansible/module_utils/basic.py\", line 5\r\nSyntaxError: future feature annotations is not defined\r\n", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}

Environment

DX NetOps Upgrade Automation

 

Cause

The python version on the target host specified in the error above does not meet the minimum requirements for DX NetOps Upgrade Automation.

Resolution

Users need to ensure python3.12 or greater with the ssl module is installed on all hostnames that are specified in the inventory.remote file.

Users then need to select this version using the below command:

update-alternatives --config python

 

If users do not want use update-alternatives, the other option is to set the correct path for the below variable in the ansible.cfg file

interpreter_python=/usr/bin/python3