You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting error message "ModuleNotFoundError: No module named 'jnpr'". I am able to run first task to check the NETCONF connectivity to the lab device.
This how my environment is setup: Windows11-wsl2:Ubuntu20.04, python3.8-full Virtual environment, within this venv installed ansible, Junos-pync, Jxmlease, xmltodict.
PLAY [Load and commit Junos configurations] ****************************************************************************************************************
TASK [Load and commit the configurations] ******************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'jnpr'
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 107, in \n _ansiballz_main()\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.config', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.config', _modlib_path=modlib_path),\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in run_code\n exec(code, run_globals)\n File "/tmp/ansible_juniper.device.config_payload_vpwou34/ansible_juniper.device.config_payload.zip/ansible_collections/juniper/device/plugins/modules/config.py", line 828, in \n File "", line 259, in load_module\n File "/tmp/ansible_juniper.device.config_payload_vpwou34/ansible_juniper.device.config_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 42, in \nModuleNotFoundError: No module named 'jnpr'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
(myansible) student@DESKTOP-VF2VLG4:~$ python3
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import jnpr.junos
jnpr.junos.version
'2.7.0'
Thank you in advance for looking into this.
Amrish Patel
The text was updated successfully, but these errors were encountered:
Hello,
I am getting error message "ModuleNotFoundError: No module named 'jnpr'". I am able to run first task to check the NETCONF connectivity to the lab device.
This how my environment is setup: Windows11-wsl2:Ubuntu20.04, python3.8-full Virtual environment, within this venv installed ansible, Junos-pync, Jxmlease, xmltodict.
(myansible) student@DESKTOP-VF2VLG4:~$ ansible-playbook -i configuration/hosts Interface_desc_update.yml
PLAY [Load and commit Junos configurations] ****************************************************************************************************************
TASK [Verify NETCONF connectivity] *************************************************************************************************************************
ok: [xxx.xxx.xxx.xxx]
TASK [Load and commit the configurations] ******************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'jnpr'
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 107, in \n _ansiballz_main()\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/student/.ansible/tmp/ansible-tmp-1712339458.1710489-1769-257087027421743/AnsiballZ_config.py", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.juniper.device.plugins.modules.config', init_globals=dict(_module_fqn='ansible_collections.juniper.device.plugins.modules.config', _modlib_path=modlib_path),\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in run_code\n exec(code, run_globals)\n File "/tmp/ansible_juniper.device.config_payload_vpwou34/ansible_juniper.device.config_payload.zip/ansible_collections/juniper/device/plugins/modules/config.py", line 828, in \n File "", line 259, in load_module\n File "/tmp/ansible_juniper.device.config_payload_vpwou34/ansible_juniper.device.config_payload.zip/ansible_collections/juniper/device/plugins/module_utils/juniper_junos_common.py", line 42, in \nModuleNotFoundError: No module named 'jnpr'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
PLAY RECAP *************************************************************************************************************************************************
xxx.xxx.xxx.xxx : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
(myansible) student@DESKTOP-VF2VLG4:~$ python3
Python 3.8.10 (default, Nov 22 2023, 10:22:35)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Thank you in advance for looking into this.
Amrish Patel
The text was updated successfully, but these errors were encountered: