Open kichkasnet opened 1 year ago
Hi,
I have NetBox version 3.4.3
Getting error when trying to run this script:
2023-08-29 15:19:45,749 {/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:89} [DEBUG] Nmap arguments: ['-sS', '-O', '-T4', '-n'] 2023-08-29 15:32:24,193 {/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:188} [INFO] Converting Nmap scan results to NetBox objects… 2023-08-29 15:32:24,193 {/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py:191} [INFO] Recognition of the device with IP 10.10.0.1 is started… /usr/lib/python3/dist-packages/urllib3/connectionpool.py:1015: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.10.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings warnings.warn( Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/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/carrier/asyncore/dgram/base.py", line 170, in handle_read self._cbFun(self, transportAddress, incomingMessage) File "/usr/local/lib/python3.9/dist-packages/pysnmp/carrier/base.py", line 84, in _cbFun self.__recvCallables[recvId]( File "/usr/local/lib/python3.9/dist-packages/pysnmp/entity/engine.py", line 151, in __receiveMessageCbFun self.msgAndPduDsp.receiveMessage( File "/usr/local/lib/python3.9/dist-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage msgVersion = verdec.decodeMessageVersion(wholeMsg) File "/usr/local/lib/python3.9/dist-packages/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion seq, wholeMsg = decoder.decode( File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 2003, in __call__ for asn1Object in streamingDecoder: File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 1918, in __iter__ for asn1Object in self._singleItemDecoder( File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 1778, in __call__ for value in concreteDecoder.valueDecoder( File "/usr/local/lib/python3.9/dist-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 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/andrey/netbox-device-autodiscovery/run.py", line 283, in <module> main() File "/home/andrey/netbox-device-autodiscovery/run.py", line 221, in main nb_objects = m.run() File "/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py", line 71, in run nb_objects = self.process_scan_results(hosts) File "/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py", line 200, in process_scan_results recognized_device = self.active_device_recognition(ip, open_ports) File "/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/nmap_network_scanner.py", line 183, in active_device_recognition if device := recognize_by_snmp(ip_addr, 161, snmp_community, retries=self.config['snmp_retry_count']): File "/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/active_recognition.py", line 141, in recognize_by_snmp if system_description := snmp_get_request(oid=('SNMPv2-MIB', 'sysDescr', 0)): File "/home/andrey/netbox-device-autodiscovery/modules/nmap_network_scanner/active_recognition.py", line 132, in snmp_get error_indication, error_status, error_index, var_binds = next(iterator) File "/usr/local/lib/python3.9/dist-packages/pysnmp/hlapi/asyncore/sync/cmdgen.py", line 113, in getCmd snmpEngine.transportDispatcher.runDispatcher() File "/usr/local/lib/python3.9/dist-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 "/usr/local/lib/python3.9/dist-packages/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/carrier/asyncore/dgram/base.py", line 170, in handle_read self._cbFun(self, transportAddress, incomingMessage) ; File "/usr/local/lib/python3.9/dist-packages/pysnmp/carrier/base.py", line 84, in _cbFun self.__recvCallables[recvId]( ; File "/usr/local/lib/python3.9/dist-packages/pysnmp/entity/engine.py", line 151, in __receiveMessageCbFun self.msgAndPduDsp.receiveMessage( ; File "/usr/local/lib/python3.9/dist-packages/pysnmp/proto/rfc3412.py", line 291, in receiveMessage msgVersion = verdec.decodeMessageVersion(wholeMsg) ; File "/usr/local/lib/python3.9/dist-packages/pysnmp/proto/api/verdec.py", line 15, in decodeMessageVersion seq, wholeMsg = decoder.decode( ; File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 2003, in __call__ for asn1Object in streamingDecoder: ; File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 1918, in __iter__ for asn1Object in self._singleItemDecoder( ; File "/usr/local/lib/python3.9/dist-packages/pyasn1/codec/ber/decoder.py", line 1778, in __call__ for value in concreteDecoder.valueDecoder( ; File "/usr/local/lib/python3.9/dist-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
Hello,
Is your problem resolved. Can you please advise as i am also facing the same issue.
Email ID - Kalolwalaismail@gmail.com
Hi,
I have NetBox version 3.4.3
Getting error when trying to run this script: