Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to run compiled MIB results in error while loading #50

Open
rustyscottweber opened this issue Jul 14, 2019 · 2 comments
Open

Comments

@rustyscottweber
Copy link

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\pysnmp\smi\builder.py", line 344, in loadModule
    exec(codeObj, g)
  File "C:\Projects\test_mibs\USHA-MIB.py", line 211, in <module>
    upsDevicesTable = MibTable((1, 3, 6, 1, 4, 1, 2468, 1, 2, 1, 1, 9, 2), ).setIndexNames((0, "USHA-MIB", "indexOfDevice"))
AttributeError: 'MibTable' object has no attribute 'setIndexNames'

Mibs were compiled as such:

~/Downloads/mibs$ mibdump.py --destination-format=pysnmp --destination-directory=./../test_mibs ./RFC1628.MIB
Source MIB repositories: /mnt/c/Users/RWeber.OSS/Downloads/mibs, file:///usr/share/snmp/mibs, http://mibs.snmplabs.com/asn1/@mib@
Borrow missing/failed MIBs from: http://mibs.snmplabs.com/pysnmp/notexts/@mib@
Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs
Compiled MIBs destination directory: ./../test_mibs
MIBs excluded from code generation: INET-ADDRESS-MIB, PYSNMP-USM-MIB, RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB
MIBs to compile: RFC1628
Destination format: pysnmp
Parser grammar cache directory: not used
Also compile all relevant MIBs: yes
Rebuild MIBs regardless of age: no
Dry run mode: no
Create/update MIBs: yes
Byte-compile Python modules: yes (optimization level no)
Ignore compilation errors: no
Generate OID->MIB index: no
Generate texts in MIBs: no
Keep original texts layout: no
Try various file names while searching for MIB module: yes
Created/updated MIBs:
Pre-compiled MIBs borrowed:
Up to date MIBs: RFC-1212, RFC-1215, RFC1155-SMI, RFC1213-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, UPS-MIB
Missing source MIBs:
Ignored MIBs:
Failed MIBs:
~/Downloads/mibs$ mibdump.py --destination-format=pysnmp --destination-directory=./../test_mibs ./USHAP-v6.MIB
Source MIB repositories: /mnt/c/Users/RWeber.OSS/Downloads/mibs, file:///usr/share/snmp/mibs, http://mibs.snmplabs.com/asn1/@mib@
Borrow missing/failed MIBs from: http://mibs.snmplabs.com/pysnmp/notexts/@mib@
Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs
Compiled MIBs destination directory: ./../test_mibs
MIBs excluded from code generation: INET-ADDRESS-MIB, PYSNMP-USM-MIB, RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB
MIBs to compile: USHAP-v6
Destination format: pysnmp
Parser grammar cache directory: not used
Also compile all relevant MIBs: yes
Rebuild MIBs regardless of age: no
Dry run mode: no
Create/update MIBs: yes
Byte-compile Python modules: yes (optimization level no)
Ignore compilation errors: no
Generate OID->MIB index: no
Generate texts in MIBs: no
Keep original texts layout: no
Try various file names while searching for MIB module: yes
Created/updated MIBs:
Pre-compiled MIBs borrowed:
Up to date MIBs: RFC-1212, RFC-1215, RFC1155-SMI, RFC1213-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, UPS-MIB, USHA-MIB
Missing source MIBs:
Ignored MIBs:
Failed MIBs:

@rustyscottweber
Copy link
Author

Added files for debugging.
test_mibs.zip

@lextm
Copy link

lextm commented Mar 3, 2024

This should have been fixed in a specific commit in the past. Cannot reproduce it any more with pysmi-lextudio release 1.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants