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

Latest Pysmi 1.5.1 produces MIB compilation error #133

Closed
umair-zink opened this issue Oct 14, 2024 · 2 comments
Closed

Latest Pysmi 1.5.1 produces MIB compilation error #133

umair-zink opened this issue Oct 14, 2024 · 2 comments
Labels
area:pysmi PySMI package bug Something isn't working

Comments

@umair-zink
Copy link

Expected behavior

compiler.addMibCompiler(mibBuilder, sources=['http://mibs.snmplabs.com/asn1/@mib@'])

should work without any errors

Actual behavior

root@2a66d39a64fa:/usr/app/src# python pysnmp_listen.py
Traceback (most recent call last):
File "/usr/app/src/pysnmp_listen.py", line 40, in
compiler.addMibCompiler(mibBuilder, sources=['http://mibs.snmplabs.com/asn1/@mib@'])
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pysnmp/smi/compiler.py", line 41, in add_mib_compiler
raise error.SmiError("MIB compiler not available: %s" % errorMsg)
pysnmp.smi.error.SmiError: MIB compiler not available: cannot import name 'getReadersFromUrls' from 'pysmi.reader.url' (/usr/local/lib/python3.13/site-packages/pysmi/reader/url.py)

Detailed steps

Not sure if its a bug or not, but I was using the latest pysnmp with pysmi 1.5.0 till last week and they were working fine, but today i built my docker and it pulled up the latest pysmi 1.5.1 and it started giving me the MIB compiler error on the same code which was working last week.

Changing pysmi back to 1.5.0 works fine again.

Python package information

root@f3bee6b444e3:/# pip list Package Version ------------------ ----------- boto3 1.35.39 botocore 1.35.39 certifi 2024.8.30 charset-normalizer 3.4.0 idna 3.10 Jinja2 3.1.4 jmespath 1.0.1 MarkupSafe 3.0.1 pip 24.2 ply 3.11 pyasn1 0.6.1 pysmi 1.5.0 pysnmp 7.1.7 python-dateutil 2.9.0.post0 requests 2.32.3 s3transfer 0.10.3 six 1.16.0 urllib3 2.2.3

Operating system information

Linux Ubuntu

Python information

3.13.0

(Optional) Contents of your test script

mibBuilder = builder.MibBuilder()
compiler.addMibCompiler(mibBuilder, sources=['http://mibs.snmplabs.com/asn1/@mib@'])

Relevant log output

root@2a66d39a64fa:/usr/app/src# python pysnmp_listen.py
Traceback (most recent call last):
  File "/usr/app/src/pysnmp_listen.py", line 40, in <module>
    compiler.addMibCompiler(mibBuilder, sources=['http://mibs.snmplabs.com/asn1/@mib@'])
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/pysnmp/smi/compiler.py", line 41, in add_mib_compiler
    raise error.SmiError("MIB compiler not available: %s" % errorMsg)
pysnmp.smi.error.SmiError: MIB compiler not available: cannot import name 'getReadersFromUrls' from 'pysmi.reader.url' (/usr/local/lib/python3.13/site-packages/pysmi/reader/url.py)
@umair-zink umair-zink added bug Something isn't working triage New issues that need to be sorted out. labels Oct 14, 2024
@lextudio-support lextudio-support added the priority:low Low priority items. label Oct 14, 2024
@lextudio-support
Copy link

New issues are marked as low priority by default. Becoming our commercial customers, and then your reports are handled with higher priority after triage.

@lextm lextm added area:pysmi PySMI package and removed triage New issues that need to be sorted out. priority:low Low priority items. labels Oct 14, 2024
@lextm lextm closed this as completed Oct 14, 2024
@lextm
Copy link

lextm commented Oct 14, 2024

Fixed in pysmi 1.5.4 release.

@lextm lextm pinned this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pysmi PySMI package bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants