Re: [pysnmp-users] PySNMP 4.3.1 strange prettyPrint() output
Brought to you by:
elie
From: Wei W. <ww...@9r...> - 2015-11-18 22:02:14
|
Made a bit of progress, with this manual MIB file compilation: mibdump.py /opt/nss/etc/snmp/mibs/cisco/AIRESPACE-WIRELESS-MIB.mib That created two MIB files in the .py format in ~/.pysnmp/mibs folder. But my code still throws exception: 2015-11-18 16:56:29,465 ERROR base_events.default_exception_handler:1053 Exception in callback _cbFun(<pysnmp....a2b44e90>, ('10.50.0.12', 161), '0\x82\x06[\x... \x00\x00\x00') handle: <Handle _cbFun(<pysnmp....a2b44e90>, ('10.50.0.12', 161), '0\x82\x06[\x... \x00\x00\x00')> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/trollius/events.py", line 136, in _run self._callback(*self._args) File "/usr/local/lib/python2.7/dist-packages/pysnmp/carrier/base.py", line 63, in _cbFun self, transportDomain, transportAddress, incomingMessage File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/engine.py", line 140, in __receiveMessageCbFun self, transportDomain, transportAddress, wholeMsg File "/usr/local/lib/python2.7/dist-packages/pysnmp/proto/rfc3412.py", line 453, in receiveMessage cachedParams['cbCtx']) File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/rfc3413/cmdgen.py", line 125, in processResponsePdu cbFun(snmpEngine, origSendRequestHandle, None, PDU, cbCtx) File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/rfc3413/cmdgen.py", line 349, in processResponseVarBinds varBindTable, cbCtx): File "/usr/local/lib/python2.7/dist-packages/pysnmp/hlapi/asyncio/cmdgen.py", line 440, in __cbFun (errorIndication, errorStatus, errorIndex, [vbProcessor.unmakeVarBinds(snmpEngine, varBindTableRow, lookupMib) for varBindTableRow in varBindTable]) File "/usr/local/lib/python2.7/dist-packages/pysnmp/hlapi/varbinds.py", line 37, in unmakeVarBinds varBinds = [ObjectType(ObjectIdentity(x[0]), x[1]).resolveWithMib(mibViewController) for x in varBinds] File "/usr/local/lib/python2.7/dist-packages/pysnmp/smi/rfc1902.py", line 728, in resolveWithMib raise SmiError('Value %r to type %r convertion failure: %s' % (self.__args[1], self.__args[0].getMibNode().getSyntax().__class__.__name__, sys.exc_info()[1])) SmiError: Value OctetString(hexValue='555320000000') to type 'OctetString' convertion failure: ConstraintsIntersection(ConstraintsIntersection(ConstraintsIntersection(), ValueSizeConstraint(0, 65535)), ValueSizeConstraint(3, 3)) failed at: "ValueSizeConstraint(3, 3) failed at: "US ^@^@^@"" at OctetString |