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

snmpsim isn't compatible with pyasn1's latest version #18

Open
joaopio opened this issue May 5, 2023 · 0 comments
Open

snmpsim isn't compatible with pyasn1's latest version #18

joaopio opened this issue May 5, 2023 · 0 comments

Comments

@joaopio
Copy link

joaopio commented May 5, 2023

Hello.
Recently (20 April 2023) pyasn1's library has been updated, which means that when installing the simulator it's now automatically installing pyasn1 0.5.0

This causes an incompatibility with the simulator, triggered when an snmpwalk command is sent to it:

Traceback (most recent call last): File "/home/ptin_admin/python3_venvs/snmpsim_venv/bin/snmpsim-command-responder", line 8, in <module> sys.exit(main()) File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/snmpsim/commands/responder.py", line 916, in main transport_dispatcher.runDispatcher() File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 50, in runDispatcher raise PySnmpError('poll error: %s' % ';'.join(format_exception(*exc_info()))) pysnmp.error.PySnmpError: poll error: Traceback (most recent call last): ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 46, in runDispatcher use_poll=True, map=self.__sockMap, count=1) ; File "/usr/lib64/python3.6/asyncore.py", line 207, in loop poll_fun(timeout, map) ; File "/usr/lib64/python3.6/asyncore.py", line 188, in poll2 readwrite(obj, flags) ; File "/usr/lib64/python3.6/asyncore.py", line 123, in readwrite obj.handle_error() ; File "/usr/lib64/python3.6/asyncore.py", line 108, in readwrite obj.handle_read_event() ; File "/usr/lib64/python3.6/asyncore.py", line 423, in handle_read_event self.handle_read() ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read self._cbFun(self, transportAddress, incomingMessage) ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/carrier/base.py", line 85, in _cbFun self, transportDomain, transportAddress, incomingMessage ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/entity/engine.py", line 152, in __receiveMessageCbFun self, transportDomain, transportAddress, wholeMsg ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage msgVersion = verdec.decodeMessageVersion(wholeMsg) ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pysnmp/proto/api/verdec.py", line 17, in decodeMessageVersion recursiveFlag=False, substrateFun=lambda a, b, c: (a, b[:c]) ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 2003, in __call__ for asn1Object in streamingDecoder: ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 1919, in __iter__ self._substrate, self._asn1Spec, **self._options): ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 1781, in __call__ self, substrateFun, **options): ; File "/home/ptin_admin/python3_venvs/snmpsim_venv/lib64/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 654, in valueDecoder for chunk in substrateFun(asn1Object, substrate, length, options): ;TypeError: <lambda>() takes 3 positional arguments but 4 were given caused by <class 'TypeError'>: <lambda>() takes 3 positional arguments but 4 were given

Forcing pip to downgrade to pyasn1 0.4.8 fixes the issue

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

1 participant