title: NoneType object is not iterable
body: <p>I am getting a 'NoneType' object is not iterable TypeError in the code below.  The code below is ment to use pyautogui to scroll through 10 images in the digits folder (named 0 through 9, named with the # in the image) and when ever it finds one, report the value of x along with the number it found.  The dictionary is then sorted by x values to read the number found in the image.</p>
  
  <p><strong>Question:</strong> I am still learning Python and this TypeError has me stomped, how can I correct this?</p>
  
  <pre><code>#! python3
  import sys
  import pyautogui
  
  # locate Power
  found = dict()
  for digit in range(10):
      positions = pyautogui.locateOnScreen('digits/{}.png'.format(digit),
                                           region=(888, 920, 150, 40), grayscale=True)
      for x, _, _, _ in positions:
          found[x] = str(digit)
  cols = sorted(found)
  value = ''.join(found[col] for col in cols)
  print(value)
  </code></pre>
  
  <p><strong>Traceback of the error:</strong></p>
  
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File "C:\Users\test\python3.6\HC\power.py", line 10, in &lt;module&gt;
      for x, _, _, _ in positions:
  TypeError: 'NoneType' object is not iterable
  </code></pre>