-
Notifications
You must be signed in to change notification settings - Fork 25
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
NameError: global name 'NXAPI' is not define #14
Comments
Can you paste what you are trying too including import statements, etc. ?
|
Here is the script I'm trying to run. switch = Device(ip='rdc-mdf-rsw21',username='##############',password='####################') get_sh_ver = switch.show('show version') sh_ver_dict = xmltodict.parse(get_sh_ver[1]) print json.dumps(sh_ver_dict, indent=4) |
Can you please post everything with the error so I can see the full workflow? So, please post the exact code you are using along with the error. How did you install pycsco? What OS are you using?
|
I'm running win7. I used easy_install do to my companies firewall policy. import xmltodict No module named yaml Traceback (most recent call last): |
So, you should install this via |
I get the same error but I think I narrowed it down to the yaml library not being installed. If I install PyYAML it works fine but if I uninstall it I get:
|
When I try to run the example script I get the following error.
File "C:\Python27\lib\site-packages\pycsco-0.3.0-py2.7.egg\pycsco\nxos\device.py", line 61, in init
self.sw1 = NXAPI
NameError: global name 'NXAPI' is not defined
I've tried a couple of fixes, but not being a python expert I'm stuck.
The text was updated successfully, but these errors were encountered: