lextudio / pysnmp

Python SNMP library
https://www.pysnmp.com/pysnmp/
BSD 2-Clause "Simplified" License
74 stars 18 forks source link

[Bug]: AttributeError: 'SnmpEngine' object has no attribute 'openDispatcher' #71

Closed Omid888 closed 2 weeks ago

Omid888 commented 3 months ago

While following the official examples, from here, (which is expected to be a working code) 2 errors were occurred:

Traceback (most recent call last):
  File "/Users/ata/PycharmProjects/snmp-lextudio/main.py", line 102, in <module>
    snmpEngine.openDispatcher()
AttributeError: 'SnmpEngine' object has no attribute 'openDispatcher'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/ata/PycharmProjects/snmp-lextudio/main.py", line 104, in <module>
    snmpEngine.closeDispatcher()
AttributeError: 'SnmpEngine' object has no attribute 'closeDispatcher'

Note: As I noticed, all the examples in this repo are subject to this problem.

Python package information

pysnmp-lextudio==6.1.2

Operating system information

mac os

Python information

3.8

mtellese commented 2 months ago

From what I gather its a depreciated functionality that just hasn't been updated. They do note on the website that much of the examples are old and likely outdated.