Hi
I posted this on another thread but messed up the title (called it y2exe) and I want to make sure this gets found if someone can help. I'm using py2exe and pysnmp, and they seem to be incompatible, at least on the oneliner form I'm using. Pysnmp claims to be
py2exe friendly, and I want to know what I'm doing wrong.
Here's the code:
from pysnmp.entity.rfc3413.oneliner import cmdgen
from pysnmp.entity import config
from Tkinter import *
def doCmd( key ):
errorIndication, errorStatus, errorIndex, varBinds =
cmdgen.CommandGenerator().getCmd(
cmdgen.CommunityData('my-agent', 'public', 0),
cmdgen.UdpTransportTarget(("127.0.0.1", 161 )),
key)
print errorIndication
print errorStatus
for item in varBinds:
print item
doCmd( (1,3,6,1,4,1,557,1,1,10,3,1,1,305) )
Here's the output I get when I run this:
Produces this output:
Traceback (most recent call last):
File "snmpbad.py", line 16, in <module>
File "snmpbad.py", line 6, in doCmd
File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 116, in __init__
File "pysnmp\entity\engine.pyc", line 16, in __init__
File "pysnmp\proto\rfc3412.pyc", line 16, in __init__
File "pysnmp\smi\builder.pyc", line 143, in __init__
File "pysnmp\smi\builder.pyc", line 35, in init
File "pysnmp\smi\builder.pyc", line 80, in _init
ImportError: No module named mibs.instances
Here's my compilation script:
from distutils.core import setupimport py2exe setup(console=['snmpbad.py'])from distutils.core import setup
import py2exe
setup(console=['snmpbad.py'])
Any help would be extremely appreciated!