title: PYSNMP 4.4.12- Cannot compile custom MIBs
body: <p>I'm struggling to load custom MIBs in my first attempt at pysnmp. I have read that the old versions required a compiling of the custom mibs, and the newer versions embed the compiling in backend processes. When I try either method, the script just hangs ... indefinitely. The custom MIB is CISCO-PRODUCTS.MIB which I have downloaded and ends with a .my extension.</p>
  <pre><code>python3 mibdump.py  --mib-source=file://./ --destination-directory=/home/myuser/Desktop/Ansible/mibs --destination-format=pysnmp  CISCO-PRODUCTS-MIB
  
  Source MIB repositories: file://./  Borrow missing/failed MIBs from:
  http://mibs.snmplabs.com/pysnmp/notexts/@mib@  
  Existing/compiled MIB locations: pysnmp.smi.mibs, pysnmp_mibs  
  Compiled MIBs destination directory: /home/myuser/Desktop/Ansible/mibs  
  MIBs excluded from code generation: INET-ADDRESS-MIB, PYSNMP-USM-MIB, RFC-1212, RFC-1215, RFC1065-SMI, RFC1155-SMI, RFC1158-MIB, RFC1213-MIB, SNMP-FRAMEWORK-MIB, SNMP-TARGET-MIB, SNMPv2-CONF, SNMPv2-SMI, SNMPv2-TC, SNMPv2-TM, TRANSPORT-ADDRESS-MIB  
  MIBs to compile: CISCO-PRODUCTS-MIB  
  Destination format: pysnmp  
  Parser grammar cache directory: not used  
  Also compile all relevant MIBs: yes  
  Rebuild MIBs regardless of age: no  
  Dry run mode: no  
  Create/update MIBs: yes  
  Byte-compile Python modules: yes (optimization level no)  
  Ignore compilation errors: no  
  Generate OID-&gt;MIB index: no  
  Generate texts in MIBs: no  
  Keep original texts layout: no  
  Try various file names while searching for MIB module: yes  
  
  </code></pre>
  <pre><code>Traceback (most recent call last):   File &quot;mibdump.py&quot;, line 350, in
  &lt;module&gt;
      processed = mibCompiler.compile(   File &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/compiler.py&quot;,
  line 227, in compile
      fileInfo, fileData = source.getData(mibname)   File &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/reader/localfile.py&quot;,
  line 105, in getData
      for path in self.getSubdirs(self._path, self._recursive, self._ignoreErrors):   File
  &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/reader/localfile.py&quot;,
  line 64, in getSubdirs
      dirs.extend(self.getSubdirs(d, recursive))   File &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/reader/localfile.py&quot;,
  line 64, in getSubdirs
      dirs.extend(self.getSubdirs(d, recursive))   File &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/reader/localfile.py&quot;,
  line 64, in getSubdirs
      dirs.extend(self.getSubdirs(d, recursive))   [Previous line repeated 44 more times]   File
  &quot;/home/myuser/.local/lib/python3.8/site-packages/pysmi/reader/localfile.py&quot;,
  line 63, in getSubdirs
      if os.path.isdir(d):   File &quot;/usr/lib/python3.8/genericpath.py&quot;, line 42, in isdir
      st = os.stat(s) KeyboardInterrupt
  </code></pre>
  <p>The files in the same directory are:</p>
  <ul>
  <li>CISCO-PRODUCTS-MIB.my</li>
  <li>CISCO-SMI.my</li>
  <li>mibdump.py</li>
  <li>SNMPv2-CONF.my</li>
  <li>SNMPv2-SMI.my</li>
  <li>SNMPv2-TC.my</li>
  </ul>
  <p>Does anyone know where the error is?</p>