#1 UnboundLocalError: local variable 'varBinds' referenced ...

open
nobody
None
5
2012-01-23
2012-01-23
Anonymous
No

Hi!, tested the simulator with a Eaton Rack Monitor which only supports protocol v1, the simulator explodes with this:

Traceback (most recent call last):
File "snmprec.py", line 206, in <module>
snmpEngine.transportDispatcher.runDispatcher()
File "/usr/lib64/python2.6/site-packages/pysnmp/carrier/asynsock/dispatch.py", line 33, in runDispatcher
poll(timeout and timeout or self.timeout, self.__sockMap)
File "/usr/lib64/python2.6/asyncore.py", line 141, in poll
read(obj)
File "/usr/lib64/python2.6/asyncore.py", line 78, in read
obj.handle_error()
File "/usr/lib64/python2.6/asyncore.py", line 74, in read
obj.handle_read_event()
File "/usr/lib64/python2.6/asyncore.py", line 413, in handle_read_event
self.handle_read()
File "/usr/lib64/python2.6/site-packages/pysnmp/carrier/asynsock/dgram/base.py", line 73, in handle_read
self._cbFun(self, transportAddress, incomingMessage)
File "/usr/lib64/python2.6/site-packages/pysnmp/carrier/base.py", line 43, in _cbFun
self, transportDomain, transportAddress, incomingMessage
File "/usr/lib64/python2.6/site-packages/pysnmp/entity/engine.py", line 61, in __receiveMessageCbFun
self, transportDomain, transportAddress, wholeMsg
File "/usr/lib64/python2.6/site-packages/pysnmp/proto/rfc3412.py", line 442, in receiveMessage
cachedParams['cbCtx']
File "/usr/lib64/python2.6/site-packages/pysnmp/entity/rfc3413/cmdgen.py", line 148, in processResponsePdu
(cbFun, cbCtx),
File "/usr/lib64/python2.6/site-packages/pysnmp/entity/rfc3413/cmdgen.py", line 473, in _handleResponse
if not varBinds:
UnboundLocalError: local variable 'varBinds' referenced before assignment

Works fine on a Brocade switch using protocol 2c, not sure if that's related.

Discussion