-
Notifications
You must be signed in to change notification settings - Fork 2
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: bad argument type for built-in operation #55
Comments
Hmm interesting, I tried adding my other 3 mikrotik switches, and they all seem to work fine, just that one isn't. device_discovery:
discovery_1:
scope:
- driver: ros
hostname: "192.168.99.4"
username: user
password: pass
- driver: ros
hostname: "192.168.99.5"
username: user
password: pass
|
Hi @ctark you can try to run this script locally and compare the router that errors out and one that it working fine to see if there is differences #!/usr/bin/env python
from napalm import get_network_driver
# Define device credentials
device_params = {
"hostname": "192.168.99.5",
"username": "admin",
"password": "<password>",
"optional_args": {}
}
# Get the ros driver
driver = get_network_driver("ros")
# Connect to the device
device = driver(**device_params)
try:
print("Connecting to the device...")
device.open() # Open a connection
print(device.get_facts())
print(device.get_interfaces())
print(device.get_interfaces_ip())
except Exception as e:
print(f"ERROR: {e}")
finally:
# Close the connection
device.close()
print("Connection closed.") |
Hey @leoparente, I compared the problematic one and a working one (.5 and .4 respectively), and both outputs look very similar, nothing stands out. |
With the above code there is no error for .5? It has same responses patterns as .4? |
That's Correct, no error for either, 3 lines of output each. I performed the test in two ways, the first was by going into the running docker container, and executing it from the same shell that the script is running in. |
Hello Team!
Thank you for the constant work on this project. Please let me know if you have any ideas on the below, or would like me to test anything!
I am currently using the develop docker branch, and am receiving the following error:
{"level":"info","ts":"2025-01-24T10:35:41.285-0500","caller":"devicediscovery/device_discovery.go:147","msg":"device-discovery stderr","log":"ERROR:device_discovery.policy.runner:Policy discovery_1, Hostname 192.168.99.5: bad argument type for built-in operation"}
Agent.yaml: (with api, username and password changed)
docker log: (error is 2nd last line)
The text was updated successfully, but these errors were encountered: