title: How to skip AttributeError in for loop python and continue the loop
body: <p>I using a 'for loop' to record the IMEI number from multiple files in an array. </p>
  
  <p>When, but when no IMEI is detected the for loop stops indicating AttributeError:rint.</p>
  
  <pre><code>    result = getattr(asarray(obj), method)(*args, **kwds)
      AttributeError: rint
  </code></pre>
  
  <p>I have used this method:</p>
  
  <pre><code>for IMEI in file():
      try:
          detect the IMEI from the files()
          Append them to the array()
      exception AttributeError:
          print 'File name'
          pass
  </code></pre>
  
  <p>What I would like to do is to skip the error if the IMEI is not detected in the file and then continue with the loop looking for IMEI in other files.</p>
  
  <p>IMEI refers to 16Digit AlphaNumeric code. I use it as a 'string'.</p>
  
  <p>There are 3200 '.dat' files which I processed for finding such a Alpha Numeric text in each file.
  Each dat file has some HEX data in it.</p>