-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Pyinstaller .exe errors when sending trap #39
Comments
There have been some relevant changes in the latest released pysnmp (4.3.3)... With which pysnmp version you are experiencing this crash? What pyasn1 version you are using? Are you packing the same pysnmp/pyasn1 versions into your PyInstaller executable? The socket address conversion is probably happening here or here. It looks like this conversion is not really invoked so that serialized address (4+2 octets) is reaching the low-level socket code. |
Here's the output of pip freeze C:\Python34\Scripts> .\pip.exe freeze If I downgrade to pysnmp version 4.3.0 and run the same code I will get the same TypeError without compiling to .exe output of running script on 4.3.0 TypeError: getsockaddrarg() takes exactly 2 arguments (6 given) |
I'm getting error "TypeError: getsockaddrarg() takes exactly 2 arguments (6 given)" when sending a trap after compiling into a windows .exe with Pyinstaller and the --onefile option. This is with the example code at http://pysnmp.sourceforge.net/examples/v3arch/asyncore/agent/ntforg/snmp-versions.html#snmpv1-trap . It works fine as a plain .py script.
if I add debugging to pysnmp/carrier/asyncore/dgram/base.py line 142
I see the following when it works as a .py script:
transportAddress: ('10.6.105.121', 162)
And the following when it fails as a Windows .exe
If I modify base.py to fix transportAddress it starts working as a windows .exe
I'm not sure if this is necessarly an issue with pysnmp, pyinstaller, python on Windows, or if I should be adding additional code if I plan to compile to .exe
The text was updated successfully, but these errors were encountered: