title: Pixel RGB Value Identifier - TypeError: argument must be sequence of length 2
body: <p>I've been having trouble with PIL and trying to get my program to print the rgb value of a pixel.</p>
  <p><strong>The code</strong>:</p>
  <pre><code>import PIL
  
  try:
      import Image
  except ImportError:
      from PIL import Image
  
  ###
      
  filename = input ('Picture Filename - ')
  
  image = PIL.Image.open(filename)
  
  image.show()
  
  width, height = image.size
  
  image_rgb = image.convert('RGB')
  
  w = 1
  h = 1
  
  a = 1
  b = 2
  while a &lt; b:
      while (w &lt;= width):
          rgb_pixel_value_1 = int(image_rgb.getpixel(w))
          rgb_pixel_value_2 = int(image_rgb.getpixel(h))
          print(rgb_pixel_value_1)
          print(rgb_pixel_value_2)
          w += 1
      if w == width and h &lt; height:
          h += 1
      if h == height:
          a = 3
  </code></pre>
  <p>Intended Output:
  The program should print the value of every pixel from [1, 1] to [height, width]</p>
  <p>Actual Output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;I:/Programming/Python/Useful Projects/Image Colour Space Checker/Revision 1.py&quot;, line 27, in &lt;module&gt;
      rgb_pixel_value_1 = int(image_rgb.getpixel(w))
    File &quot;C:\Users\rdmor\AppData\Roaming\Python\Python38\site-packages\PIL\Image.py&quot;, line 1367, in getpixel
      return self.im.getpixel(xy)
  TypeError: argument must be sequence of length 2
  </code></pre>
  <p>What I've tried:
  I have tried very little as there is so little about this subject on the internet and anything at all related was mildly useful at best</p>
  <p><strong>There are likely other errors, however minor, that I haven't noticed yet</strong></p>