title: How to get on screen image coordinates using pyautogui in python 2.7
body: <p>When I run this script:</p>
  
  <pre><code>import pyautogui
  
  x, y = pyautogui.locateCenterOnScreen('key7.png')
  pyautogui.click(x, y)
  </code></pre>
  
  <p>I get this error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:/Users/SMART/Desktop/locate.py", line 3, in &lt;module&gt;  
      x, y = pyautogui.locateCenterOnScreen('key7.png')  
  TypeError: 'NoneType' object is not iterable
  </code></pre>
  
  <p>I want to locate then click a button on the calculator:  </p>
  
  <p>like the number 7. I want to locate the key and get it's center <code>x</code> and <code>y</code></p>
  
  <p>Any suggestions to do this task using python 2.7 with pyautogui?</p>