napalm-automation-community / napalm-ros

MikroTik RouterOS NAPALM driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

napalm_ros.query error

SerhiiZahuba opened this issue · comments

After updating the module, I get an error related to napalm_ros.query . But I can't find the napalm_ros.query module.

``
(venv) [root@Inventory netbox]# napalm --user admin --vendor napalm_ros 91.1.1.1 call get_config
Enter password:
2022-07-25 19:09:10,286 - napalm - ERROR - get_network_driver - Failed: No module named 'napalm_ros.query'

================= Traceback =================

Traceback (most recent call last):
File "/opt/netbox/venv/bin/napalm", line 8, in
sys.exit(main())
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/clitools/cl_napalm.py", line 308, in main
run_tests(args)
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/clitools/cl_napalm.py", line 268, in run_tests
driver = call_get_network_driver(args.vendor)
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/clitools/cl_napalm.py", line 27, in wrapper
r = func(*args, **kwargs)
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/clitools/cl_napalm.py", line 170, in call_get_network_driver
return get_network_driver(vendor)
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/init.py", line 95, in get_network_driver
raise e
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm/base/init.py", line 86, in get_network_driver
module = importlib.import_module(module_name)
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm_ros/init.py", line 7, in
from napalm_ros.ros import ROSDriver
File "/opt/netbox/venv/lib/python3.9/site-packages/napalm_ros/ros.py", line 37, in
from napalm_ros.query import (
ModuleNotFoundError: No module named 'napalm_ros.query'


Module is here.

Provide information about:

  • napalm version
  • napalm-ros version
  • librouteros version

USE issue report template. It's is for a good reason.

Thank you. I'm sorry. Added information below.

napalm version - 4.0.0
napalm-ros - 1.0.1
librouteros - 3.2.1

napalm --user admin --vendor napalm_ros 91.1.1.1 call get_config

Now I'm getting another error

{ "running": "expected end of command (line 1 column 14)\n", "candidate": "expected end of command (line 1 column 14)\n", "startup": "expected end of command (line 1 column 14)\n" }

napalm-ros with get_config() isn't released yet so how did you execute get_config ?

I copied all your changes to get_config. I thought it would work. If you have information - please write when the new version will be released.

It's released.

after update to 1.1.0 i see an erorr

Enter password:
{
"running": "expected end of command (line 1 column 14)\n",
"candidate": "expected end of command (line 1 column 14)\n",
"startup": "expected end of command (line 1 column 14)\n"
}

Which version of routeros are you running on destination host ?

Does /export terse work for you in regular ssh session ?

Yes. Works.

did not help

Enter password: 
{
    "running": "expected end of command (line 1 column 15)\n",
    "candidate": "expected end of command (line 1 column 15)\n",
    "startup": "expected end of command (line 1 column 15)\n"
}

Hmm Then I don't know what's the problem. 🤷

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.