Cisco Nexus 9000 Series Troubleshooting Manual page 91

Nx-os release 7.x
Hide thumbs Also See for Nexus 9000 Series:
Table of Contents

Advertisement

Troubleshooting the Python API
Symptom
Solution
Example
>>> import urllib2
>>>
u=urllib2('http://172.23.40.211:8000/welcome.html')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable
>>>
u=urllib2.urlopen('http://172.23.40.211:8000/welcome.html')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/isan/python/python2.7/urllib2.py",
line 127, in urlopen
return _opener.open(url, data, timeout)
File "/isan/python/python2.7/urllib2.py",
line 404, in open
response = self._open(req, data)
File "/isan/python/python2.7/urllib2.py",
line 422, in _open
'_open', req)
File "/isan/python/python2.7/urllib2.py",
line 382, in _call_chain
result = func(*args)
File "/isan/python/python2.7/urllib2.py",
line 1214, in http_open
return
self.do_open(httplib.HTTPConnection, req)
File "/isan/python/python2.7/urllib2.py",
line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 113]
No route to host>
>>> from cisco.vrf import *
>>> VRF.get_vrf_name_by_id(get_global_vrf())
'default'
Cisco Nexus 9000 Series NX-OS Troubleshooting Guide, Release 7.x
Receiving Python API Errors
79

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents