Re: [Pysnmp-dev] noSuchInstance
Brought to you by:
elie
From: Ilya E. <il...@gl...> - 2004-11-30 10:46:48
|
Could you please send me the repr() of raw response message your script generates while polling that device. Having smth like: print repr(rawrsp) would be a useful hint. Are you using the same SNMP version (v2c) when polling with AdnentNet browser? Also, to rule out a bug in your device code -- try adding '.0' to your OID e.g. '1.3.6.1.4.1.5655.4.1.6.3.0'. -ilya > I am trying to use the pysnmp with the basic operation of GETREQUEST from a > network device that support SNMP and I responded with "noSuchInstance" > although this specific OID has value and it can be seen by "AdnentNet" Snmp > browser, the code I am using is: > > from pysnmp import role, v2c, asn1 > > ###################################################################### > req = v2c.GETREQUEST() > tr = role.manager(('10.1.12.85', 161)) > (rawrsp, src) = tr.send_and_receive( \ > req.encode(community='guy', \ > encoded_oids=map(asn1.OBJECTID().encode,[ > '1.3.6.1.4.1.5655.4.1.6.3']))) > rsp = v2c.RESPONSE() > rsp.decode(rawrsp) > oids = map(lambda x:x[0], map(asn1.OBJECTID().decode, rsp['encoded_oids'])) > print oids > vals = map(lambda x: x[0](), map(asn1.decode, rsp['encoded_vals'])) > print map(asn1.decode, rsp['encoded_vals']) > print vals > > ###################################################################### > > and the output I recieve is: > > ########################################### > > ['.1.3.6.1.4.1.5655.4.1.6.3'] > [(noSuchInstance(''), '')] > [''] > > ########################################### |