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

No module named 'netmiko.ssh_exception' as of netmiko>=4.1.1 #21

Open
angely-dev opened this issue Feb 9, 2023 · 0 comments
Open

No module named 'netmiko.ssh_exception' as of netmiko>=4.1.1 #21

angely-dev opened this issue Feb 9, 2023 · 0 comments

Comments

@angely-dev
Copy link

To reproduce:

from napalm import get_network_driver
driver = get_network_driver('ce')
device = driver(hostname='blabla', username='hello', password='there')
device.open()
print(device.get_facts())

Stack trace with netmiko==4.1.1 (and above):

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    driver = get_network_driver('ce')
  File "venv/lib/python3.10/site-packages/napalm/base/__init__.py", line 97, in get_network_driver
    raise e
  File "venv/lib/python3.10/site-packages/napalm/base/__init__.py", line 88, in get_network_driver
    module = importlib.import_module(module_name)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "venv/lib/python3.10/site-packages/napalm_ce/__init__.py", line 16, in <module>
    from napalm_ce.ce import CEDriver  # noqa
  File "venv/lib/python3.10/site-packages/napalm_ce/ce.py", line 34, in <module>
    from netmiko.ssh_exception import NetMikoTimeoutException
ModuleNotFoundError: No module named 'netmiko.ssh_exception'

Line: https://github.com/napalm-automation-community/napalm-ce/blob/v0.2.0/napalm_ce/ce.py#L34
It works with netmiko==4.1.0.

Possible fix: ktbyers/netmiko#3032 (comment)

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

1 participant