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

<lambda>() takes 3 positional arguments but 4 were given #440

Closed
ashhhi opened this issue May 6, 2023 · 5 comments
Closed

<lambda>() takes 3 positional arguments but 4 were given #440

ashhhi opened this issue May 6, 2023 · 5 comments

Comments

@ashhhi
Copy link

ashhhi commented May 6, 2023

In windows, the code works perfect, but when I put it in Linux, something happened!
Traceback (most recent call last): File "SNMP_NGPON (2).py", line 83, in <module> snmp_run_v2.nextcmd() File "SNMP_NGPON (2).py", line 58, in nextcmd snmpEngine.transportDispatcher.runDispatcher() File "/home/calix/.local/lib/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/calix/.local/lib/python3.6/site-packages/pysnmp/carrier/asyncore/dispatch.py", line 46, in runDispatcher use_poll=True, map=self.__sockMap, count=1) ; File "/usr/local/python3.6.5/lib/python3.6/asyncore.py", line 207, in loop poll_fun(timeout, map) ; File "/usr/local/python3.6.5/lib/python3.6/asyncore.py", line 188, in poll2 readwrite(obj, flags) ; File "/usr/local/python3.6.5/lib/python3.6/asyncore.py", line 123, in readwrite obj.handle_error() ; File "/usr/local/python3.6.5/lib/python3.6/asyncore.py", line 108, in readwrite obj.handle_read_event() ; File "/usr/local/python3.6.5/lib/python3.6/asyncore.py", line 423, in handle_read_event self.handle_read() ; File "/home/calix/.local/lib/python3.6/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read self._cbFun(self, transportAddress, incomingMessage) ; File "/home/calix/.local/lib/python3.6/site-packages/pysnmp/carrier/base.py", line 85, in _cbFun self, transportDomain, transportAddress, incomingMessage ; File "/home/calix/.local/lib/python3.6/site-packages/pysnmp/entity/engine.py", line 152, in __receiveMessageCbFun self, transportDomain, transportAddress, wholeMsg ; File "/home/calix/.local/lib/python3.6/site-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage msgVersion = verdec.decodeMessageVersion(wholeMsg) ; File "/home/calix/.local/lib/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/calix/.local/lib/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 2003, in __call__ for asn1Object in streamingDecoder: ; File "/home/calix/.local/lib/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 1919, in __iter__ self._substrate, self._asn1Spec, **self._options): ; File "/home/calix/.local/lib/python3.6/site-packages/pyasn1/codec/ber/decoder.py", line 1781, in __call__ self, substrateFun, **options): ; File "/home/calix/.local/lib/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

@lextm
Copy link

lextm commented May 6, 2023

Duplicate to pyasn1/pyasn1#28

@and157
Copy link

and157 commented May 11, 2023

My recommendation if u want a quick fix just install pyasn1 with the version 0.4.8 , this will solve your problem

@ashhhi
Copy link
Author

ashhhi commented May 12, 2023

My recommendation if u want a quick fix just install pyasn1 with the version 0.4.8 , this will solve your problem

Thanks!Solved

@lextm
Copy link

lextm commented Jun 7, 2023

@shijunshen Please close this issue if you feel the issue is resolved.

This repo lost its original owner, so now if issue creators like you don't close issues yourselves, none of them can be closed otherwise.

Read #429 to learn more.

@ashhhi ashhhi closed this as completed Jun 8, 2023
@wayne-guan2021
Copy link

It is helpful for me, my pyasn1 version was 0.5.0, after downgrade to 0.4.8, the issue was fixed, thanks.

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

4 participants