Open Cristianistrate opened 5 years ago
Could you share which pysnmp version you have installed and what example you trying to run?
listen-on-ipv4-and-ipv6-interfaces.py python 3.7.3. as for pysnmp i just pip installed a few minutes ago
I suspect you have taken the example from GitHub master (pysnmp 5.x.x), but installed pysnmp (4.4.10) from PyPI. Then you should take examples from release-4.4.10 branch.
Thanks, i will try to install 5
Just keep in mind that pysnmp 4 is stable, pysnmp 5 is still in development (though it should work).
Ok. Thanks.
One more think, when i run the example provided by you above a got this error (127.0.0.1): WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
when I put a printer IP isnotead of 127....: [WinError 10049] The requested address is not valid in its context
I think the system prevents you from binding port 161 unless you are a superuser.
Printer IP perhaps is a remote IP, you can only listen on local IP interfaces.
You may try ('0.0.0.0', 1024), that should avoid both of the above mentioned problems.
You can also change DOMAIN_NAME to domainName in the code.
I intalled pysnmp and if I open an example ai get some errors when running: AttributeError: module 'pysnmp.carrier.asyncore.dgram.udp' has no attribute 'DOMAIN_NAME' or NameError: name 'USM_AUTH_HMAC96_SHA' is not defined
Please, tell me what I do wrong.