Models: tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: A\A10.jpg : The system cannot find the path specified. ; No such process

Created on 30 Jun 2018  路  12Comments  路  Source: tensorflow/models

CRITICAL:tensorflow:File does not exist A\A10.jpg
Traceback (most recent call last):
File "C:\Users\naveed\Desktop\sign-language-alphabet-recognizer-master\train.py", line 1024, in
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
File "C:\Users\naveed\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 126, in run
_sys.exit(main(argv))
File "C:\Users\naveed\Desktop\sign-language-alphabet-recognizer-master\train.py", line 768, in main
bottleneck_tensor)
File "C:\Users\naveed\Desktop\sign-language-alphabet-recognizer-master\train.py", line 395, in cache_bottlenecks
jpeg_data_tensor, bottleneck_tensor)
File "C:\Users\naveed\Desktop\sign-language-alphabet-recognizer-master\train.py", line 343, in get_or_create_bottleneck
bottleneck_tensor)
File "C:\Users\naveed\Desktop\sign-language-alphabet-recognizer-master\train.py", line 297, in create_bottleneck_file
image_data = gfile.FastGFile(image_path, 'rb').read()
File "C:\Users\naveed\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 120, in read
self._preread_check()
File "C:\Users\naveed\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 80, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\naveed\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: A\A10.jpg : The system cannot find the path specified.

; No such process
Having this problem while retraining the model with the new dataset. Kindly help me to solve the problem.

awaiting response

Most helpful comment

The error would have caused that it did not find the directory of the file to be converted

i don't know if this helps but adding this solved my problem:
--image_dir=images/train/

example:
python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=images/train/

**My images are found in the train folder and the generate_tfrecord.py is in line with my images folder.

Hope this helps someone

All 12 comments

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
What is the top-level directory of the model you are using
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce

Closing due to lack of recent activity. Please update the issue when new information becomes available, and we will reopen the issue. Thanks!

i have created csv files using xml_to_csv.py. while i am running generate_tfrecord.py to create TFrecord, it is giving following error.:
Traceback (most recent call last):
File "generate_tfrecord.py", line 117, in
tf.app.run()
File "C:\Anaconda\envs\tf_gpu\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "generate_tfrecord.py", line 108, in main
tf_example = create_tf_example(group, path)
File "generate_tfrecord.py", line 63, in create_tf_example
encoded_jpg = fid.read()
File "C:\Anaconda\envs\tf_gpu\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 125, in read
self._preread_check()
File "C:\Anaconda\envs\tf_gpu\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 85, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Anaconda\envs\tf_gpu\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: C:/Anaconda/envs/tf_gpu/Lib/site-packages/tensorflow/models/research/workspace/hand_demo/images/1390.jpg : The system cannot find the file specified.
; No such file or directory
i have checked manually in csv files there is no mismatch between count of images and xml files - could you please resolve this issue for me? i have been struggling for quite a while. Thank you!

Hi,

I'm getting a similar error on Windows :

File "train.py", line 184, in
tf.app.run()
File "C:\Users\dhruva.gupta\AppData\Local\Continuum\anaconda3\envs\tensorflow_cpu\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "C:\Users\dhruva.gupta\AppData\Local\Continuum\anaconda3\envs\tensorflow_cpu\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, in new_func
return func(args, *kwargs)
File "train.py", line 108, in main
overwrite=True)
File "C:\Users\dhruva.gupta\AppData\Local\Continuum\anaconda3\envs\tensorflow_cpu\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 397, in copy
compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status)
File "C:\Users\dhruva.gupta\AppData\Local\Continuum\anaconda3\envs\tensorflow_cpu\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: : The system cannot find the path specified.
; No such process

Is anyone looking into this ?

im having same issue
CUDA 10
tensorflow-gpu 1.14
WIndows 10
im using object_detection api from tensorflow
Nvidia 1060 16 gb ram.
Capture

Any Solution??

still noting found to fix it?

image

im having same issue
CUDA 10
tensorflow-gpu 1.14
WIndows 10
im using object_detection api from tensorflow
Nvidia 1060 16 gb ram.
Capture

I too faced the same issue. Try giving the image_dir path in the commandline along with the csv input and tfrecord path.

still no solution?

i had same issue, but this had something to do with my images/train folder and respective xml files miss match and label.csv

even if there is small issue/ miss match in images and xml you will get error...

step 1 : check - image/train/cat1.jpg
step 2 : check the file name col data in your- train_labels.csv
the name should be exactly matching in images/train and train_labels.csv (verify with all images,xml)

once everything is done run below command..

python generate_tfrecord.py --csv_input=images/train_labels.csv --image_dir=images/train --output_path=train.record

The error would have caused that it did not find the directory of the file to be converted

i don't know if this helps but adding this solved my problem:
--image_dir=images/train/

example:
python generate_tfrecord.py --csv_input=data/train_labels.csv --output_path=data/train.record --image_dir=images/train/

**My images are found in the train folder and the generate_tfrecord.py is in line with my images folder.

Hope this helps someone

Was this page helpful?
0 / 5 - 0 ratings