03-24-2020 02:42 AM
Trying to setup my environment for the Intro to ACI programmability (https://developer.cisco.com/learning/lab/sbx-intro-aci-02_programmability-options/step/1) and followed all the steps successfully until I tried to follow the step:-
(venv) apic_fabric_setup\ $ python baseline.py
and got the following error:-
Baselining APIC Simulator for Learning Labs Setting up Fabric Nodes Traceback (most recent call last): File "baseline.py", line 11, in <module> import startup_script File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/startup_script.py", line 42, in <module> c.addMo(topMo) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/cobra/mit/request.py", line 897, in addMo self.__configMos[mo.dn] = mo AttributeError: 'NoneType' object has no attribute 'dn'
Any ideas what is going on?
Paul
03-24-2020 06:53 AM
Have you followed the .. How To Setup Your Own Computer
03-24-2020 07:51 AM
Yes, all the steps completed without error.
03-24-2020 09:05 AM
I have followed the same steps and get the same error.
It looks like the cobra files are missing on the apic simulator.
https://sandboxapicdc.cisco.com/cobra/_downloads/
returns 403,404
03-24-2020 10:36 AM
Try this:
acicobra-3.0_1k-py2.7.egg —> https://developer.cisco.com/fileMedia/download/39308f27-4956-4bd8-8127-d0fac29158c4
acimodel-3.0_1k-py2.7.egg —> https://developer.cisco.com/fileMedia/download/928a762b-c2c7-4374-840a-9d3242aa8e27
03-25-2020 12:25 AM
I get the following errors when I try to `pip install` those modules:-
(apic_fabric_setup) paul@paul-Inspiron-5537:~/Downloads$ pip install acicobra-3.0_1k-py2.7.egg Collecting acicobra-3.0_1k-py2.7.egg Exception: Traceback (most recent call last): File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 795, in get_page resp.raise_for_status() File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/acicobra-3-0-1k-py2-7-egg/ (apic_fabric_setup) paul@paul-Inspiron-5537:~/Downloads$ pip install acimodel-3.0_1k-py2.7.egg Collecting acimodel-3.0_1k-py2.7.egg Exception: Traceback (most recent call last): File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/lib/python3.6/site-packages/pip/index.py", line 795, in get_page resp.raise_for_status() File "/home/paul/Documents/Study/devnet_ll/code/aci-learning-labs-code-samples/apic_fabric_setup/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/acimodel-3-0-1k-py2-7-egg/
03-25-2020 01:34 AM - edited 03-25-2020 01:35 AM
404 Client Error: Not Found for url: https://pypi.org/simple/acicobra-3-0-1k-py2-7-egg/
Cannot see this package on - https://pypi.org/
I get the same error
03-25-2020 01:38 AM
acicobra-3.0_1k-py2.7.egg
acimodel-3.0_1k-py2.7.egg
are these not for apic v3 and python2.7? or it doesn't matter?
apic simulator https://sandboxapicdc.cisco.com/
is on v4 and devnet lab is using Python 3
thanks
03-25-2020 01:39 AM
\
acicobra-3.0_1k-py2.7.egg
acimodel-3.0_1k-py2.7.egg
are these not for apic v3 and python2.7? or it doesn't matter?
apic simulator https://sandboxapicdc.cisco.com/
is on v4 and devnet lab is using Python 3
thanks
03-25-2020 03:55 AM
These are more current and the ones referenced in the learning lab ACI Programmability Options
For setting up your own environment, follow the set up (How To Setup Your Own Computer) of learning lab - https://developer.cisco.com/learning/lab/sbx-intro-aci-02_programmability-options/step/1
03-25-2020 04:20 AM
yep completed step 1 - setup your own computer
although the guide tells you use - python setup.py install - after downloading acitoolkit from git ..
it doesn't complete the setup
error: The 'flask' distribution was not found and is required by flask-wtf, acitoolkit, flask-httpauth
unless you do - pip install -r requirements.txt under acitoolkit. After this acitoolkit setup completes successfully.
and 4.2 .whl files installed successfully.
... Installing collected packages: ply, future, acicobra Running setup.py install for future ... done Successfully installed acicobra-4.2-3h future-0.18.2 ply-3.11 ... Installing collected packages: acimodel Successfully installed acimodel-4.2-3h
The issue is with
startup_script.py for baseline .. adding MO .. c.addMo(topMo)
$ python baseline.py Baselining APIC Simulator for Learning Labs Setting up Fabric Nodes Traceback (most recent call last): File "baseline.py", line 11, in <module> import startup_script File "/home/dev-workspace/aci-venv/aci-learning-labs-code-samples/apic_fabric_setup/startup_script.py", line 42, in <module> c.addMo(topMo) File "/home/dev-workspace/aci-venv/lib/python3.6/site-packages/cobra/mit/request.py", line 897, in addMo self.__configMos[mo.dn] = mo AttributeError: 'NoneType' object has no attribute 'dn'
03-25-2020 05:30 AM
03-26-2020 01:30 AM
It should work now .. just tested ..
$ ./baseline.py Baselining APIC Simulator for Learning Labs Setting up Fabric Nodes Configuring Fabric Policies Setting up Common Tenant Setting up Heroes Tenant Setting up SnV Tenant
@bigevilbeard thanks a lot for directing to the WebEx Teams room.
There was another issue where no changes were being made on the apic.
Both issues got resolved by resetting the sandbox.
03-26-2020 02:31 AM
Thanks for the update, i saw Hank jumped in. I was chatting with our ENG support team, as I saw another two threads having an issue with the same sandbox.
03-26-2020 03:30 AM
Thanks, I can confirm that it is now working :0)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide