Closed dteycheney closed 3 years ago
After thinking that packaging
was a local import, I found that it's actually a pypi module.
I then installed the packaging
module:
pip3 install packaging
It looks like this commit replaced semver
with packaging
but the poetry file wasn't updated with packaging
I then ran the tool again and it's working.
Update the relevant files with the packaging
details which were altered in the commit:
https://github.com/networktocode/network-importer/commit/72b5715cbb605e408282120b9ad2504cd6470df3
Based on this discussion it looks like it could be related to your version of pip and setuptools https://gist.github.com/hangtwenty/b9820fe204eebb0cc5b9aba49f3c8b22
We need to work on re-enabling the integration tests in CI to properly validate that
Thanks @dgarros, just wanted to confirm that you are going to re-enable integration tests for these?
@dteycheney Yes we need to re-enable the integration tests, but it might take some time because we want to migrate to Github Actions as well. I'll try to reenable travis CI in the meantime but not sure if it will work, we had some issues in the past.
All good @dgarros , happy with the workaround for now
I'm gonna close this one, @jvanderaa reenabled all CI tests on GHA in #226
Environment
Steps to Reproduce
toml
file. In my example, I have a file calledyy.toml
:backend = "nautobot"
[logs] level = "debug"
[inventory.settings] address = "https://10.X.Y.Z"
network-importer check --update-configs --config yy.toml
2021-08-16 14:26:53,837 - network-importer - INFO - Updating configuration from devices .. 2021-08-16 14:26:53,845 - network-importer - DEBUG - Executing dispatcher for ANONYMISED-DEV-L27-C44-R1 (iosxe) 2021-08-16 14:26:53,846 - network-importer - DEBUG - Found driver network_importer.drivers.default 2021-08-16 14:26:53,846 - network-importer - DEBUG - Executing dispatcher for ANONYMISED-DEV-L27-C95-S1 (iosxe) 2021-08-16 14:26:53,846 - network-importer - DEBUG - Executing dispatcher for ANONYMISED-DEV-L27-N93-S2 (nxos) 2021-08-16 14:26:53,847 - network-importer - DEBUG - Found driver network_importer.drivers.default 2021-08-16 14:26:53,847 - network-importer - DEBUG - Executing dispatcher for ANONYMISED-DEV-L30-C93-S1 (iosxe) 2021-08-16 14:26:53,847 - network-importer - DEBUG - Found driver network_importer.drivers.default 2021-08-16 14:26:53,848 - network-importer - DEBUG - Executing dispatcher for ANONYMISED-DEV-L30-C93-S2 (iosxe) 2021-08-16 14:26:53,848 - network-importer - DEBUG - Found driver network_importer.drivers.default 2021-08-16 14:26:53,848 - network-importer - DEBUG - Found driver network_importer.drivers.default 2021-08-16 14:26:53,857 - network-importer - DEBUG - Executing get_config for ANONYMISED-DEV-L27-C95-S1 (iosxe) 2021-08-16 14:26:53,857 - network-importer - DEBUG - Executing get_config for ANONYMISED-DEV-L27-C44-R1 (iosxe) 2021-08-16 14:26:53,857 - network-importer - DEBUG - Executing get_config for ANONYMISED-DEV-L30-C93-S1 (iosxe) 2021-08-16 14:26:53,858 - network-importer - DEBUG - Executing get_config for ANONYMISED-DEV-L30-C93-S2 (iosxe) 2021-08-16 14:26:53,858 - network-importer - DEBUG - Executing get_config for ANONYMISED-DEV-L27-N93-S2 (nxos) 2021-08-16 14:26:59,719 - network-importer - INFO - ANONYMISED-DEV-L27-C44-R1 | Latest config file already present ... 2021-08-16 14:27:01,066 - network-importer - INFO - ANONYMISED-DEV-L30-C93-S1 | Latest config file already present ... 2021-08-16 14:27:02,152 - network-importer - INFO - ANONYMISED-DEV-L30-C93-S2 | Latest config file already present ... 2021-08-16 14:27:02,549 - network-importer - INFO - ANONYMISED-DEV-L27-N93-S2 | Latest config file already present ... 2021-08-16 14:27:02,988 - network-importer - INFO - ANONYMISED-DEV-L27-C95-S1 | Latest config file already present ... 2021-08-16 14:27:02,989 - network-importer - INFO - Import SOT Model Traceback (most recent call last): File "/home/xdteycheney/.pyenv/versions/net_nautobot_toolkit/bin/network-importer", line 8, in
sys.exit(main())
File "/home/xdteycheney/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/home/xdteycheney/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/xdteycheney/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/xdteycheney/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/home/xdteycheney/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(args, *kwargs)
File "/home/localuser/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/network_importer/cli.py", line 148, in check
ni.init(limit=limit)
File "/home/localuser/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/network_importer/performance.py", line 67, in timed
result = method(args, **kw)
File "/home/localuser/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/network_importer/main.py", line 106, in init
sot_adapter = getattr(importlib.import_module(".".join(sot_path[0:-1])), sot_path[-1])
File "/home/localuser/.pyenv/versions/3.8.6/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/localuser/.pyenv/versions/3.8.6/envs/net_nautobot_toolkit/lib/python3.8/site-packages/network_importer/adapters/nautobot_api/adapter.py", line 6, in
from packaging.version import Version, InvalidVersion
ModuleNotFoundError: No module named 'packaging'