You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting the above error when running a script studying for the DevNet Associate exam using the ACI Reservable Sandbox.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\user\PycharmProjects\devnet_studies\apic\apic_all_endpoints.py", line 14, in
ENDPOINTS = aci.Endpoint.get(SESSION)
File "C:\Users\user\PycharmProjects\devnet_studies\venv\lib\site-packages\acitoolkit\acitoolkit.py", line 5409, in get
endpoints = Endpoint._get(session, endpoint_name, interfaces,
File "C:\Users\user\PycharmProjects\devnet_studies\venv\lib\site-packages\acitoolkit\acitoolkit.py", line 5369, in _get
endpoint.ip = str(ep['ip'])
KeyError: 'ip'
I'm using Python 3.10.8 and have corrected the "from collections import Sequence" to import it from collections.abc
I've read over #374 but don't see a solution there. I've also got the latest version of the acitoolkit v0.4 installed.
My very simple code is below pulled from the office cert guide.
Hi
I'm getting the above error when running a script studying for the DevNet Associate exam using the ACI Reservable Sandbox.
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev\pydevd.py", line 1496, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2022.2.3\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:\Users\user\PycharmProjects\devnet_studies\apic\apic_all_endpoints.py", line 14, in
ENDPOINTS = aci.Endpoint.get(SESSION)
File "C:\Users\user\PycharmProjects\devnet_studies\venv\lib\site-packages\acitoolkit\acitoolkit.py", line 5409, in get
endpoints = Endpoint._get(session, endpoint_name, interfaces,
File "C:\Users\user\PycharmProjects\devnet_studies\venv\lib\site-packages\acitoolkit\acitoolkit.py", line 5369, in _get
endpoint.ip = str(ep['ip'])
KeyError: 'ip'
I'm using Python 3.10.8 and have corrected the "from collections import Sequence" to import it from collections.abc
I've read over #374 but don't see a solution there. I've also got the latest version of the acitoolkit v0.4 installed.
My very simple code is below pulled from the office cert guide.
import sys
import acitoolkit.acitoolkit as aci
APIC_URL = 'https://10.10.20.14'
USERNAME = 'admin'
PASSWORD = 'C1sco12345'
SESSION = aci.Session(APIC_URL, USERNAME, PASSWORD)
RESP = SESSION.login()
if not RESP.ok:
print("Couldn't log in to APIC")
sys.exit(0)
ENDPOINTS = aci.Endpoint.get(SESSION)
print(f"{'MAC Address':19s}{'| ':1}{'IP Address':14s}{'| ':1}{'Encap':10s}{'| ':1}{'Tenant':8s}{'| ':1}{'App Profile':17s}"
f"{'| ':1}{'EPG':10s}")
The text was updated successfully, but these errors were encountered: