Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error under Ubunto 20.04 #18

Open
roederstompers opened this issue Jul 31, 2021 · 1 comment
Open

Error under Ubunto 20.04 #18

roederstompers opened this issue Jul 31, 2021 · 1 comment

Comments

@roederstompers
Copy link

I get the following error on Ubuntu 20.04:

Traceback (most recent call last):
  File "./test_driver.py", line 19, in <module>
    driver = get_network_driver("procurve")
  File "/root/Develop/NAPALM/venv_NAPALM/lib/python3.8/site-packages/napalm/base/__init__.py", line 86, in get_network_driver
    module = importlib.import_module(module_name)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/root/Develop/NAPALM/napalm_procurve.py", line 7, in <module>
    driver = get_network_driver("procurve")
  File "/root/Develop/NAPALM/venv_NAPALM/lib/python3.8/site-packages/napalm/base/__init__.py", line 108, in get_network_driver
    raise ModuleImportError(
napalm.base.exceptions.ModuleImportError: No class inheriting "napalm.base.base.NetworkDriver" found in "napalm.procurve".

test_driver.py:

#!/usr/bin/env python3
# Simple napalm-procurve test



# python3 -m venv venv_NAPALM

# . venv_NAPALM/bin/activate
# pip install napalm napalm-procurve
# vi testdriver.py
# cat testdriver.py
# chmod +x testdriver.py 
# ./testdriver.py 
         

import json
from napalm import get_network_driver

driver = get_network_driver("procurve")

# Uncomment if you need debug logging of the raw commands sent to the
# device and any data received
#import logging
#logging.basicConfig(filename="procurve.debug.log", level=logging.DEBUG)
#logger = logging.getLogger("netmiko")

driver = get_network_driver("procurve")

# device = driver(
#     "10.0.0.254",
#     "manager",
#     "secret",
#     optional_args={"ssh_config_file": "~/.ssh/config", "port": 22},
# )
# device.open()

print("fished ...")

I got no error under Debian 11.

@ixs
Copy link
Owner

ixs commented Aug 4, 2021

Thanks for the reporting... Having a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants