title: No module named v4.proto.omni
body: <p>I have installed pysnmp-4.x.I am getting following error during running a SNMP program. </p>
  
  <p>I am using pysnmpSE 3.5.2 now but getting same error. I found that pysnmpSE doesn't hav v4 module. I was suggested that following error should resolved if pySNMP SE 3.x is used.</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Documents and Settings\ggne0622\Desktop\Python\google-python-exercises\babynames\SimpleAgent.py", line 18, in &lt;module&gt;
      from twistedsnmp import agent, agentprotocol, bisectoidstore
    File "C:\Python27\Lib\site-packages\twistedsnmp\agent.py", line 4, in &lt;module&gt;
      from twistedsnmp import datatypes
    File "C:\Python27\Lib\site-packages\twistedsnmp\datatypes.py", line 7, in &lt;module&gt;
      from twistedsnmp.pysnmpproto import v2c,v1
    File "C:\Python27\Lib\site-packages\twistedsnmp\pysnmpproto.py", line 13, in &lt;module&gt;
      from pysnmp.v4.proto.omni import v2c,v1, error, rfc1157, rfc1905
  ImportError: No module named v4.proto.omni
  </code></pre>
  
  <p>Code:</p>
  
  <p><code>#!/usr/bin/env python</code><br>
  <code>from twisted.internet.iocpreactor import reactor</code><br>
  <code>from twisted.internet import error as twisted_error</code><br>
  <code>from twistedsnmp import agent, agentprotocol, bisectoidstore</code><br>
  <code>#from twisted.internet import interfaces</code><br>
  <code>try:</code><br>
      <code>from twistedsnmp import bsdoidstore</code><br>
  <code>except ImportError:</code><br>
      <code>import warnings</code><br>
      <code>warnings.warn( """No BSDDB OID Storage available for testing""" )</code><br>
      <code>bsdoidstore = None</code>  </p>
  
  <p><code>def createAgent( oids ):</code><br>
      <code>ports = [161]+range(20000,25000)</code><br>
      <code>for port in ports:</code><br>
          <code>try:</code>    </p>
  
  <pre><code>        `agentObject = reactor.IOCPReactor.listenUDP(port,`   `agentprotocol.AgentProtocol(snmpVersion = 'v2c',agent = agent.Agent(dataStore =`   `bisectoidstore.BisectOIDStore(OIDs = oids,),),),)`  
      `except twisted_error.CannotListenError:`  
          `pass`  
      `else:`  
          `return agentObject, port`  
  </code></pre>
  
  <p><code>testingOIDs = {</code><br>
      <code>'.1.3.6.1.2.1.1.1.0': 'Some tool out in the field',</code><br>
      <code>'.1.3.6.1.2.1.1.2.0': '.1.3.6.1.4.1.88.3.1',</code><br>
      <code>'.1.3.6.1.2.1.1.3.0': 558566090,</code><br>
      <code>'.1.3.6.1.2.1.1.4.0': "support@somewhere.ca",</code><br>
      <code>'.1.3.6.1.2.1.1.5.0': "NameOfSystem",</code><br>
      <code>'.1.3.6.1.2.1.1.6.0': "SomeHeadEnd, West Hinterlands, Canada",</code><br>
  <code>}</code>  </p>
  
  <p><code>def main(oids=testingOIDs):</code><br>
      <code>agent, port = createAgent( oids )</code>  </p>
  
  <p><code>if __name__ == "__main__":</code><br>
      <code>reactor.IOCPReactor.callWhenRunning( main )</code><br>
      <code>reactor.IOCPReactor.run()</code>  </p>