title: TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
body: <p>I am new to Python. I am trying to recognize text from images from TensorFlow. When I try to run <code>python gen.py</code> in the terminal, I am getting a <code>TypeError</code>.</p>
  
  <pre>
  Traceback (most recent call last):
    File "gen.py", line 287, in 
     for img_idx, (im, c, p) in enumerate(im_gen):
    File "gen.py", line 277, in generate_ims
     yield generate_im(random.choice(char_ims), num_bg_images)
    File "gen.py", line 239, in generate_im
     bg = generate_bg(num_bg_images)
    File "gen.py", line 226, in generate_bg
     bg = cv2.imread(fname, cv2.IMREAD_GRAYSCALE) / 255.
  TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
  </pre>