title: cv2.imread() always throws a Nonetype only in this one program?
body: <p><a href="https://i.stack.imgur.com/nZIbM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nZIbM.jpg" alt="enter image description here"></a>Here is <a href="http://pastebin.com/ThiLDdEd" rel="nofollow noreferrer">my code.</a></p>
  
  <p><em>Line number 65</em></p>
  
  <pre><code>ma=cv2.imread(str(files1[x]),1)
  </code></pre>
  
  <p>The result of a <code>cv2.imread()</code> is always a <code>None</code>.
  I have done all basic checks.
  The file which i'm trying to read exists.
  There are no other variables or functions called <code>cv2</code> or <code>imread</code>.</p>
  
  <p>I'm using the same version of python in all cases.
  I have only one version of <code>opencv</code> installed.</p>
  
  <p>I'm using ubuntu 14.04 and the folder has read and write permissions for all users.</p>
  
  <p>I have also tested it on Pycharm with a new python file and it works.
  I have only problem with this program.
  Please let me know if u have any ideas about this problem.</p>