title: OpenCV for python error
body: <p>Fixed: The method I use for grabbing the images is to create a list of all files with extension '.jpeg'.  A rogue file in the directory was corrupted.  Deleted it and all is well.</p>
  
  <p>I'm currently using openCV for python in order to do some relatively simple image processing.  The program I've been using has worked up until this point.  And when I say work I mean that it hasn't thrown any errors like this prior, and I didn't actually change any code.  I ran the program, it ran correctly, I ran it again, and it began throwing errors.  This is the error message I am receiving:</p>
  
  <p>OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /tmp/opencv20150810-54114-etkrvl/opencv-2.4.12/modules/imgproc/src/color.cpp, line 3739</p>
  
  <p>Traceback (most recent call last):
    File "imgProccv2.py", line 86, in 
      gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)</p>
  
  <p>cv2.error: /tmp/opencv20150810-54114-etkrvl/opencv-2.4.12/modules/imgproc/src/color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cvtColor</p>
  
  <p>This is sorta disconcerting due to openCV being a bit of a pain to install and mess with on mac.  Any suggestions would be greatly appreciated.  </p>
  
  <p>On a side note.  I've been hopping between pycharm and vim as text editors.  When I open this file in vim it looks completely garbled and incoherent.  Not sure if this is an issue with pycharm or what.  </p>
  
  <p>Thanks for the help and apologies on the formatting.  I know it looks kinda ugly.</p>