Open maddig21 opened 1 year ago
Had this same issue. Apparently an issue with pyasn1 pkg version. It works with following package versions installed :
Package Version
netaddr 0.7.14 pip 22.0.4 ply 3.11 pyasn1 0.4.8 pycrypto 2.6.1 pycryptodomex 3.17 pydot 1.4.2 pyparsing 3.0.9 pysmi 0.3.4 pysnmp 4.4.12 setuptools 57.5.0 wheel 0.40.0
Hi,
i got this error when i start the diagram module:
`natlas# python3 natlas-cpython3 natlas-cli.py diagram -r 172.26.99.1 -o .\diagram.svg natlas v0.12.1 Michael Laforest mjlaforest@gmail.com Python 3.9.2
Out Catalog file: None Root node: 172.26.99.1 Discover depth: 100 Diagram title: natlas Diagram
Discovery codes: . depth ! connection error
Discovering network... Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/asyncore/dispatch.py", line 45, in runDispatcher loop(timeout or self.getTimerResolution(), File "/usr/lib/python3.9/asyncore.py", line 207, in loop poll_fun(timeout, map) File "/usr/lib/python3.9/asyncore.py", line 188, in poll2 readwrite(obj, flags) File "/usr/lib/python3.9/asyncore.py", line 123, in readwrite obj.handle_error() File "/usr/lib/python3.9/asyncore.py", line 108, in readwrite obj.handle_read_event() File "/usr/lib/python3.9/asyncore.py", line 420, in handle_read_event self.handle_read() File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read self._cbFun(self, transportAddress, incomingMessage) File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/base.py", line 84, in _cbFun self.recvCallables[recvId]( File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/entity/engine.py", line 151, in receiveMessageCbFun self.msgAndPduDsp.receiveMessage( File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/proto/rfc3412.py", line 291, in receiveMessage msgVersion = verdec.decodeMessageVersion(wholeMsg) File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion seq, wholeMsg = decoder.decode( File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 2003, in call for asn1Object in streamingDecoder: File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 1918, in iter for asn1Object in self._singleItemDecoder( File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 1778, in call for value in concreteDecoder.valueDecoder( File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 654, in valueDecoder for chunk in substrateFun(asn1Object, substrate, length, options): TypeError:() takes 3 positional arguments but 4 were given
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/root/natlas/natlas-cli.py", line 305, in
main(sys.argv[1:])
File "/root/natlas/natlas-cli.py", line 96, in main
exec_mod(mod, argv[1:])
File "/root/natlas/natlas-cli.py", line 167, in exec_mod
modret = module.entryfunc(natlas_obj, argv)
File "./modules/diagram.py", line 85, in mod_entry
natlas_obj.discover_network(opt_root_ip, 1)
File "/root/natlas/natlas/natlas.py", line 102, in discover_network
self.network.discover(root_ip)
File "/root/natlas/natlas/network.py", line 111, in discover
node, new_node = self.query_node(ip, 'UNKNOWN')
File "/root/natlas/natlas/network.py", line 275, in __query_node
if (node.try_snmp_creds(self.config.snmp_creds) == 0):
File "/root/natlas/natlas/node.py", line 249, in try_snmp_creds
if (self.snmpobj.get_cred(snmp_creds) == 1):
File "/root/natlas/natlas/snmp.py", line 154, in get_cred
errIndication, errStatus, errIndex, varBinds = cmdGen.getCmd(
File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 176, in getCmd
for (errorIndication,
File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/hlapi/asyncore/sync/cmdgen.py", line 113, in getCmd
snmpEngine.transportDispatcher.runDispatcher()
File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/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 "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/asyncore/dispatch.py", line 45, in runDispatcher
loop(timeout or self.getTimerResolution(),
; File "/usr/lib/python3.9/asyncore.py", line 207, in loop
poll_fun(timeout, map)
; File "/usr/lib/python3.9/asyncore.py", line 188, in poll2
readwrite(obj, flags)
; File "/usr/lib/python3.9/asyncore.py", line 123, in readwrite
obj.handle_error()
; File "/usr/lib/python3.9/asyncore.py", line 108, in readwrite
obj.handle_read_event()
; File "/usr/lib/python3.9/asyncore.py", line 420, in handle_read_event
self.handle_read()
; File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/asyncore/dgram/base.py", line 170, in handle_read
self._cbFun(self, transportAddress, incomingMessage)
; File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/carrier/base.py", line 84, in _cbFun
self.recvCallables[recvId](
; File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/entity/engine.py", line 151, in receiveMessageCbFun
self.msgAndPduDsp.receiveMessage(
; File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/proto/rfc3412.py", line 291, in receiveMessage
msgVersion = verdec.decodeMessageVersion(wholeMsg)
; File "/usr/local/lib/python3.9/dist-packages/pysnmp-4.4.12-py3.9.egg/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion
seq, wholeMsg = decoder.decode(
; File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 2003, in call
for asn1Object in streamingDecoder:
; File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 1918, in iter__
for asn1Object in self._singleItemDecoder(
; File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 1778, in call
for value in concreteDecoder.valueDecoder(
; File "/usr/local/lib/python3.9/dist-packages/pyasn1-0.5.0rc2-py3.9.egg/pyasn1/codec/ber/decoder.py", line 654, in valueDecoder
for chunk in substrateFun(asn1Object, substrate, length, options):
;TypeError: () takes 3 positional arguments but 4 were given
caused by <class 'TypeError'>: () takes 3 positional arguments but 4 were given`
Does anyone get also this error? SNMP creds are right and functional with a SNMP tester