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

Napalm integration "No module named napalm_base.exceptions" #1696

Closed
defo89 opened this issue Nov 8, 2017 · 0 comments
Closed

Napalm integration "No module named napalm_base.exceptions" #1696

defo89 opened this issue Nov 8, 2017 · 0 comments
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@defo89
Copy link

defo89 commented Nov 8, 2017

Issue type

Bug report

Environment

  • Python version: 2.7.9
  • NetBox version: 2.2.4
  • Napalm version: 2.0.0 (via pip install napalm)

Description

NAPALM integration in Netbox is not working with latest versions.

Not sure whether it has something to do with reunification (=>2.0.0).
exceptions.py full path: /usr/local/lib/python2.7/dist-packages/napalm/base/exceptions.py

error1

Current:

/opt/netbox-2.2.4/netbox# ./manage.py nbshell
NetBox interactive shell
Python 2.7.9 | Django 1.11.7 | NetBox 2.2.4
lsmodels() will show available models. Use help(<model>) for more info.
>>> import napalm
>>> from napalm_base.exceptions import ConnectAuthError, ModuleImportError
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ImportError: No module named napalm_base.exceptions
>>> 

Fixed:

/opt/netbox-2.2.4/netbox# ./manage.py nbshell
NetBox interactive shell
Python 2.7.9 | Django 1.11.7 | NetBox 2.2.4
lsmodels() will show available models. Use help(<model>) for more info.
>>> import napalm
>>> from napalm.base.exceptions import ConnectAuthError, ModuleImportError 
>>> 

Changing napalm_base to napalm.base /netbox-path/netbox/dcim/api/views.py fixes the issue.

Happy to submit a PR, too.

Note: even with the fix "Status" tab is not working and throws out an error:
error2

But it doesn't seem like an issue with Netbox.

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Nov 8, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants