title: TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'
body: <p>I am trying to fetch mean value from set of images in a directory but this error comes while running.</p>
  
  <p>Pls help me out to solve this,below is the code</p>
  
  <pre><code>import os
  import cv2 as cv
  import numpy as np
  path = "C:\Users\Karanths\Desktop\Images1\Hasa1"
  files=os.listdir("C:\Users\Karanths\Desktop\Images1\Hasa1")
  means=[]
  i=0
  for f in files:
   fname=path+f
   img=cv.imread(fname,0)
   avg=np.mean(img)
   means.append(avg)
   np.savetxt("means.txt",means)
  </code></pre>