Home > other >  Pysnmp how to use the IF - MIB. MIB files, always look for the IF - MIB. Py
Pysnmp how to use the IF - MIB. MIB files, always look for the IF - MIB. Py

Time:09-20

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:

reference 1st floor birdneverstop response:
solved? You had deleted the latter try, only keep the ObjectType (ObjectIdentity (' the IF - MIB ', 'ifInOctets, 0)




Use this code, excuse me, do you have receive the v3 protocol SNMP code? , is convenient to add WeChat no, give me the private chat, I private chat you? , after communication python

CodePudding user response:

refer to the second floor of candle in the wind wine (red wine team) response:
Quote: refer to 1st floor birdneverstop response:

The solution? You had deleted the latter try, only keep the ObjectType (ObjectIdentity (' the IF - MIB ', 'ifInOctets, 0)




Use this code, excuse me, do you have receive the v3 protocol SNMP code? , is convenient to add WeChat no, give me the private chat, I private chat you? , later communication python

I don't have the v3 code, you can see the official document there are instances, feel this library is a little hole, I at that time have you finished loading the if - mib. Py files, pit to death, this is what I need to use a simple class, I don't how to use the Python
  • Related