Pysnmp how to use the IF - MIB. MIB files, always look for the IF - MIB. Py, website will automatically. The MIB files into. Py?
Error code:
ObjectType (ObjectIdentity (' the IF - MIB ', 'ifInOctets, 0). AddMibSource (' E:/SNMP MIB)))
Error:
Pysnmp. Smi. Error. MibNotFoundError: IF - MIB compilation error (s) : missingcaused by & lt; The class 'pysnmp. Smi. Error. MibNotFoundError' & gt; : the MIB file "IF - MIB. Py (co)" not found in the search path (DirMibSource (' C: \ \ Users \ \ shyou \ \ PycharmProjects \ \ snmp_test \ \ venv \ \ lib \ \ site - packages \ \ pysnmp \ \ smi \ \ mibs'), DirMibSource (' C: \ \ Users \ \ shyou \ \ PycharmProjects \ \ snmp_test \ \ venv \ \ lib \ \ site - packages \ \ pysnmp \ \ smi \ \ mibs \ \ instances'), DirMibSource (' pysnmp_mibs), DirMibSource (SNMP \ 'E: \ \ \ MIB'), DirMibSource (' C: \ \ Users \ \ shyou \ \ pysnmp Configuration \ \ mibs'))
CodePudding user response:
The solution? You had deleted the latter try, only keep the ObjectType (ObjectIdentity (' the IF - MIB ', 'ifInOctets, 0)
CodePudding user response: