Wednesday, May 13, 2020

Issue loading Napalm

Traceback (most recent call last): File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\ntc_templates\parse.py", line 5, in <module> from textfsm import clitable File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\textfsm\clitable.py", line 41, in <module> from textfsm import texttable File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\textfsm\texttable.py", line 42, in <module> from textfsm import terminal File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\textfsm\terminal.py", line 25, in <module> import fcntl ModuleNotFoundError: No module named 'fcntl' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/Users/<REMOVED>/PycharmProjects/test_project/napalm_netmiko.py", line 1, in <module> import napalm File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\napalm\__init__.py", line 12, in <module> import napalm.junos File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\napalm\junos\__init__.py", line 18, in <module> from napalm.junos.junos import JunOSDriver # noqa File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\napalm\junos\junos.py", line 30, in <module> from jnpr.junos import Device File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\jnpr\junos\__init__.py", line 3, in <module> from jnpr.junos.factory.to_json import PyEzJSONEncoder File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\jnpr\junos\factory\__init__.py", line 4, in <module> from jnpr.junos.factory.factory_loader import FactoryLoader File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\jnpr\junos\factory\factory_loader.py", line 14, in <module> from jnpr.junos.factory.factory_cls import * File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\jnpr\junos\factory\factory_cls.py", line 7, in <module> from jnpr.junos.factory.cmdtable import CMDTable File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\jnpr\junos\factory\cmdtable.py", line 18, in <module> from ntc_templates import parse as ntc_parse File "C:\Users\<REMOVED>\PycharmProjects\test_project\venv\lib\site-packages\ntc_templates\parse.py", line 7, in <module> import clitable ModuleNotFoundError: No module named 'clitable' Process finished with exit code 1 

Hi, i'm getting these errors above while attempting to load a script i've done, here is the script below:

driver = napalm.get_network_driver("ios") ssh_napalm = driver( hostname="10.1.1.1", username="admin", password="pass", optional_args={"secret": "pass123"} ) ssh_napalm.open() output = ssh_napalm.cli("show ip int bri") print(output) ssh_napalm.close() 

It's only a small one so i can start getting my hands dirty with napalm that's all



No comments:

Post a Comment