pysnmp - AttributeError: 'module' object has no attribute 'MibVariable' -
i exploring pysnmp (python snmp library). while executing example, got error
attributeerror: 'module' object has no attribute 'mibvariable'
against method call cmdgen.mibvariable('snmpv2-mib', 'sysdescr', 0)
example code given below
from pysnmp.entity.rfc3413.oneliner import cmdgen cmdgen = cmdgen.commandgenerator() errorindication, errorstatus, errorindex, varbinds = cmdgen.getcmd( cmdgen.communitydata('public', 0), cmdgen.udptransporttarget(('demo.snmplabs.com', 161)), cmdgen.mibvariable('snmpv2-mib', 'sysdescr', 0), lookupnames=true, lookupvalues=true )
normally, happens if mutual top level imports exist mentioned here.
how can overcome issue without changing library source code?
i think need version 4.2.3 or greater. can download here. getting similar error , upgrading version worked me. http://sourceforge.net/projects/pysnmp/files/
Comments
Post a Comment