title: OpenCV Python not opening images with imread()
body: <p>I'm not entirely sure why this is happening but I am in the process of making a program and I am having tons of issues trying to get opencv to open images using imread. I keep getting errors saying that the image is 0px wide by 0px high. This isn't making much sense to me so I searched around on here and I'm not getting any answers from SO either. </p>
  
  <p>I have taken about 20 pictures and they are all using the same device. Probably 8 of them actually open and work correctly, the rest don't. They aren't corrupted either because they open in other programs. I have triple checked the paths and they are using full paths.</p>
  
  <p>Is anyone else having issues like this? All of my files are .jpgs and I am not seeing any problems on my end. Is this a bug or am I doing something wrong? </p>
  
  <p>Here is a snippet of the code that I am using that is reproducing the error on my end.</p>
  
  <pre><code>imgloc = "F:\Kyle\Desktop\Coinjar\Test images\ten.png"
  img = cv2.imread(imgloc)
  cv2.imshow('img',img)
  </code></pre>
  
  <p>When I change the file I just adjust the name of the file itself the entire path doesn't change it just refuses to accept some of my images which are essentially the same ones.</p>
  
  <p>I am getting this error from a later part of the code where I try to use img.shape</p>
  
  <pre><code>Traceback (most recent call last):
    File "F:\Kyle\Desktop\Coinjar\CoinJar Test2.py", line 14, in &lt;module&gt;
      height, width, depth = img.shape
  AttributeError: 'NoneType' object has no attribute 'shape'
  </code></pre>
  
  <p>and I am getting this error when I try to show a window from the code snippet above.</p>
  
  <pre><code>Traceback (most recent call last):
    File "F:\Kyle\Desktop\Coinjar\CoinJar Test2.py", line 11, in &lt;module&gt;
      cv2.imshow('img',img)
  error: ..\..\..\..\opencv\modules\highgui\src\window.cpp:261: error: (-215) size.width&gt;0 &amp;&amp; size.height&gt;0 in function cv::imshow
  </code></pre>