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
Studying for the DevNet exam and the code below produces the error at the bottom.
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, verify_ssl=False)
RESP = SESSION.login()
if not RESP.ok:
print('Could not log into APIC.')
sys.exit()
END_POINTS = aci.Endpoint.get(SESSION)
print(f'{"MAC ADDRESS":19s}{"IP ADDRESS":14s}{"ENCAP":10s}{"TENANT":8s}{"APP PROFILE":17s}{"EPG":10s}')
print('-' * 80)
for EP in END_POINTS:
epg = EP.get_parent()
app_profile = epg.get_parent()
tenant = app_profile.get_parent()
print(f'{EP.mac:19s}{EP.ip:14s}{EP.encap:10s}{tenant.name:8s}{app_profile.name:17s}{epg.name:10s}')
Error:
Traceback (most recent call last):
File "/Users/davidlawson/Documents/PycharmProjects/cisco_devnet/aci_get_endpoints.py", line 3, in
import acitoolkit.acitoolkit as aci
File "/Users/davidlawson/Documents/PycharmProjects/cisco_devnet/venv/lib/python3.10/site-packages/acitoolkit/init.py", line 35, in
from .acitoolkit import ( # noqa
File "/Users/davidlawson/Documents/PycharmProjects/cisco_devnet/venv/lib/python3.10/site-packages/acitoolkit/acitoolkit.py", line 33, in
from collections import Sequence
ImportError: cannot import name 'Sequence' from 'collections' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/collections/init.py)
I'm running Python 3.10.4 with acitoolkit 0.4
The text was updated successfully, but these errors were encountered:
Hi
Studying for the DevNet exam and the code below produces the error at the bottom.
Error:
I'm running Python 3.10.4 with acitoolkit 0.4
The text was updated successfully, but these errors were encountered: