title: Error generating a .record file in TensorFlow
body: <p>I was having one similar error and to fix it I used AttributeError: module 'tensorflow' has no attribute 'app' as a solution from <a href="https://stackoverflow.com/questions/58258003/attributeerror-module-tensorflow-has-no-attribute-app">AttributeError: module &#39;tensorflow&#39; has no attribute &#39;app&#39;</a>. Then I got the same kind of error for tf.app.run() for which I used tf.compat.v1.app.run(). Then I get the following error. Is it because of my tensorflow version?</p>
  
  <pre><code>(venv) Nandus-MacBook-Air:object_detection nandudharmapalan$ python generate_tfrecord.py --csv_input=images/train_labels.csv --image_dir=images/train --output_path=images/train.record
  Traceback (most recent call last):
    File "generate_tfrecord.py", line 99, in &lt;module&gt;
      tf.app.run()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
      _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/absl/app.py", line 299, in run
      _run_main(main, args)
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
      sys.exit(main(argv))
    File "generate_tfrecord.py", line 90, in main
      tf_example = create_tf_example(group, path)
    File "generate_tfrecord.py", line 45, in create_tf_example
      encoded_jpg = fid.read()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 122, in read
      self._preread_check()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 84, in _preread_check
      compat.as_bytes(self.__name), 1024 * 512)
  tensorflow.python.framework.errors_impl.NotFoundError: images/train/000000.jpg; No such file or directory
  (venv) Nandus-MacBook-Air:object_detection nandudharmapalan$ python generate_tfrecord.py --csv_input=images/train_labels.csv --image_dir=images/train --output_path=images/train.record
  Traceback (most recent call last):
    File "generate_tfrecord.py", line 99, in &lt;module&gt;
      tf.compat.v1.app.run()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
      _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/absl/app.py", line 299, in run
      _run_main(main, args)
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/absl/app.py", line 250, in _run_main
      sys.exit(main(argv))
    File "generate_tfrecord.py", line 90, in main
      tf_example = create_tf_example(group, path)
    File "generate_tfrecord.py", line 45, in create_tf_example
      encoded_jpg = fid.read()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 122, in read
      self._preread_check()
    File "/Users/nandudharmapalan/venv/lib/python3.7/site-packages/tensorflow_core/python/lib/io/file_io.py", line 84, in _preread_check
      compat.as_bytes(self.__name), 1024 * 512)
  tensorflow.python.framework.errors_impl.NotFoundError: images/train/000000.jpg; No such file or directory
  
  </code></pre>