Closed JoshuaFry closed 5 years ago
The issue stemmed from the compilation of the MIB file. I got this to work just fine using different files.
Awesome!
If you can share the working MIB(s), we could put them to http://mibs.snmplabs.com/asn1 so pysnmp would pull them from there and work out of the box...
I am having trouble loading in MIBs that are dependent on others. I have a directory for both compiled .py MIBs and one for none compiled .mib files. My approach is to load the MIBs into a mibBuilder then pass that into a MibViewController to resolve the OIDs with. What is the correct way to load in MIBs that are dependent on others?
---> Error
Loading MIB modules... MIB module '/Users/admin/project_hearsay/api_v1/compiled_mibs/WIRELESS-INNOVATIONS-PRODUCTS-MIB/Users/admin/project_hearsay/api_v1/compiled_mibs/WIRELESS-INNOVATIONS-PRODUCTS-MIB.py' load error: ['Traceback (most recent call last):\n', ' File "/Users/admin/project_hearsay/env/lib/python3.7/site-packages/pysnmp/smi/builder.py", line 344, in loadModule\n exec(codeObj, g)\n', ' File "/Users/admin/project_hearsay/api_v1/compiled_mibs/WIRELESS-INNOVATIONS-PRODUCTS-MIB.py", line 11, in <module>\n wirelessInnovations, = mibBuilder.importSymbols("ANDREW-MIB", "wirelessInnovations")\n', ' File "/Users/admin/project_hearsay/env/lib/python3.7/site-packages/pysnmp/smi/builder.py", line 426, in importSymbols\n \'No module %s loaded at %s\' % (modName, self)\n', 'pysnmp.smi.error.MibNotFoundError: No module ANDREW-MIB loaded at <pysnmp.smi.builder.MibBuilder object at 0x105f94198>\n']caused by <class 'pysnmp.smi.error.MibNotFoundError'>: No module ANDREW-MIB loaded at <pysnmp.smi.builder.MibBuilder object at 0x105f94198>
It seems that even though I am adding in the ANDREW-MIB to be loaded it's not recognized by the next module.
I want to be able to fully resolve all OIDs, right now this is as far as I can get
SNMPv2-SMI::enterprises.331.1.2.1.1.2.6.1.11.1
Some values are also returned as an OID and I'd like to resolve them as well.Any help would be greatly appreciated.