tensorflow / models

Models and examples built with TensorFlow
Other
77.16k stars 45.76k forks source link

tensorflow.python.framework.errors_impl.NotFoundError: Can not get size for #2984

Closed ghost closed 5 years ago

ghost commented 6 years ago
D:\Python\Python35\models-master\research\object_detection>D:\Python\Python35\python train.py --logtostderr --train_dir=training\ --pipline_config_path=training\ssd_mobilenet_v1_pets.config
Traceback (most recent call last):
  File "train.py", line 163, in <module>
    tf.app.run()
  File "C:\Users\USER\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\platform\app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "train.py", line 106, in main
    overwrite=True)
  File "C:\Users\USER\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\lib\io\file_io.py", line 384, in copy
    compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status)
  File "D:\Python\Python35\lib\contextlib.py", line 66, in __exit__
    next(self.gen)
  File "C:\Users\USER\AppData\Roaming\Python\Python35\site-packages\tensorflow\python\framework\errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: Can not get size for:  : Le chemin d\udc92acc\udce8s sp\udce9cifi\udce9 est introuvable.
drpngx commented 6 years ago

Could you fill out the template?

It looks like it's looking for a path that doesn't exist. Could you try to find out what path it is?

ghost commented 6 years ago

this is the path sir : the path d\udc92acc\udce8s sp\udce9cifi\udce9 not found

vaishnavm217 commented 6 years ago

Even I am getting a similar error using:

  1. Python3
  2. Tensorflow 1.4.1
  3. Ubuntu 16.04
  4. Tesla K80 GPU
  5. rfcn_resnet 101
    Traceback (most recent call last):
    File "object_detection/train.py", line 163, in <module>
    tf.app.run()
    File "/home/vaishnav/cv/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
    File "object_detection/train.py", line 106, in main
    overwrite=True)
    File "/home/vaishnav/cv/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 385, in copy
    compat.as_bytes(oldpath), compat.as_bytes(newpath), overwrite, status)
    File "/home/vaishnav/cv/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
    tensorflow.python.framework.errors_impl.NotFoundError: ; No such file or directory

    Command ran:

    python object_detection/train.py --logtostderr --pipepline_config_path=/home/vaishnav/facedetection/rfcn-resnet101/rfcn_resnet101_coco.config --train_dir=/home/vaishnav/facedetection/rfcn-resnet101/train
hamzamk commented 6 years ago

@Nassimbelmecheri @vaishnavm217 hi guys, did you find a solution. Please help me out here, i am stuck

xszym commented 6 years ago

Same error in windows . I'm stuck too

gewenpulan commented 6 years ago

same error too. in Jetson TX2 ,don't know why

gewenpulan commented 6 years ago

i just solved in my machine, it because space my error commandline is: python3 train.py \ --logtostderr \ --pipeline_config_path= /home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config \ --train_dir=/home/nvidia/liuhao/ObjectDetectTry/training

in this line have a space --pipeline_config_path= (space here should be remove )/home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config \

and the train_dir add training/ then it worked~ start training now

so the correct command like this: python3 train.py \ --logtostderr \ --pipeline_config_path=/home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config \ --train_dir=/home/nvidia/liuhao/ObjectDetectTry/training/

zhangxinying commented 6 years ago

hi,did you find a solution? Please help me ,thank you

zhangxinying commented 6 years ago

@vaishnavm217

vaishnavm217 commented 6 years ago

Guys check all the paths even in the config and remove white spaces as mentioned by @gewenpulan please provide absolute path.

gloomyfish1998 commented 6 years ago

i can run training in my windows machine, but end of training, i got the this issue

File "C:\Program Files\Python\Python36\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 379, in recursive_create_dir pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status) File "C:\Program Files\Python\Python36\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in exit c_api.TF_GetCode(self.status.status)) ensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: D:/tensorflow/my_train/models/train\export\Servo\temp-b'153466596 '; No such file or directory

any suggestion for me //?

hamzamk commented 6 years ago

@gloomyfish1998 Hey, use Anaconda's package manager to install Tensorflow CPU version on windows. If you want to use the GPU version then install Ubuntu first, and then you can use the latest implementation of Tensorflow GPU version. The error you are getting I clearly because of a path error as you can see from the back and forward slash mixup in your path. I was stuck with Tensorflow and installing and setting it up on Windows was harder than learning Tensorflow πŸ—‘

in my experience Ubuntu+Anaconda+Tensorflow is the best combination, otherwise, you will be wasting a lot of time.

Good Luck!

ZucchiniTang commented 6 years ago

@gewenpulan

i just solved in my machine, it because space my error commandline is: python3 train.py --logtostderr --pipeline_config_path= /home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config --train_dir=/home/nvidia/liuhao/ObjectDetectTry/training

in this line have a space --pipeline_config_path= (space here should be remove )/home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config \

and the train_dir add training/ then it worked~ start training now

so the correct command like this: python3 train.py --logtostderr --pipeline_config_path=/home/nvidia/liuhao/ObjectDetectTry/training/ssd_mobilenet_v1_pets.config --train_dir=/home/nvidia/liuhao/ObjectDetectTry/training/

Thanks for your help firstly. I think you are right, it's typing problem. I forgot to add ''--" before "pipeline_config_path", and it caused this error too. After I correct my command, it's work now.

bindujiit commented 6 years ago

File "export_inference_graph.py", line 150, in tf.app.run() File "/home/bindu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "export_inference_graph.py", line 134, in main text_format.Merge(f.read(), pipeline_config) File "/home/bindu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 125, in read self._preread_check() File "/home/bindu/anaconda3/envs/tensorflow/lib/python3.6/site-packages/tensorflow/python/lib/io/file_io.py", line 85, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "/home/bindu/anaconda3/envs/tensorflow/lib/python3.6/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: training/ssd_mobilenet_v1_pets.config; No such file or directory i am getting this error

zubairahmed-ai commented 5 years ago

Got this same message on Windows after 16 hours of training, this is not nice, will try the fix now

bindujiit commented 5 years ago

zubairahmed-ai@ thanku so much .. I got and fixed this issue. Issue is ssd_mobilenet_v1_pets.config file is not found at the designated folder. I just copy and paste this file and issue is resolved.

zubairahmed-ai commented 5 years ago

Which folder was it not found? @Bindu1408 My file is there along with my checkpoints in the same folder but why did I get this error? Also right now my training is unable to restart due to this error

INFO:tensorflow:Skipping training since max_steps has already saved. I1125 13:03:36.894908 12508 tf_logging.py:115] Skipping training since max_steps has already saved.

zubairahmed-ai commented 5 years ago

Problem fixed I had to create a export within my model_dir and within the export a servo folder in order to get the final model saved

I provide relative paths to everything in my config and I had no space in my paths still I got this error until I did the above

Also this error INFO:tensorflow:Skipping training since max_steps has already saved. I1125 13:03:36.894908 12508 tf_logging.py:115] Skipping training since max_steps has already saved. disappeared after I deleted checkpoint file from the training folder

soufianesabiri commented 5 years ago

When running this command: python -m retrain --how_many_training_steps=500 --output_graph=out.pb --output_labels=labels.txt --image_dir=lp --tfhub_module https://tfhub.dev/google/imagenet/mobilenet_v1_100_224/feature_vector/1

I get this error: tensorflow.python.framework.errors_impl.NotFoundError: FindFirstFile failed for: C:/Users/Omen/Desktop/lp/license : Le chemin d\udc92acc\udce8s sp\udce9cifi\udce9 est introuvable. ; No such process

jay-thakur commented 5 years ago

Hi @soufianesabiri, Did you find any solution for error ?

DeepNeurons commented 5 years ago

File "C:\Users\Mouhamed Hedi\New folder\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: FindFirstFile failed for: C:/Users/Mouhamed Hedi/Desktop/models/researh/object_detection : The system cannot find the path specified. ; No such process Hi evrey one i got this error ! do any one know how to solve that ?

dhanpalrajpurohit commented 5 years ago

use full path --train_dir = /home/*/*/..... --pipeline_config_path=/jome/*/*/*.....

mr-haseeb commented 5 years ago

when i run python3 generate_tfrecord.py --csv_input=data/test_labels.csv --output_path=test.record

β”œβ”€β”€ data
β”‚Β Β  β”œβ”€β”€ test_labels.csv
β”‚Β Β  └── train_labels.csv
β”œβ”€β”€ generate_tfrecord.py
β”œβ”€β”€ images
β”‚Β Β  β”œβ”€β”€ test
β”‚Β Β  └── train
β”‚Β Β  
β”œβ”€β”€ test.record
β”œβ”€β”€ training
└── xml_to_csv.py

File "/usr/lib/python3.6/contextlib.py", line 88, in exit next(self.gen) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: 12.jpg

daniel-ranti commented 4 years ago

I just spent 30 minutes with @katieh trying to understand why tf couldn't find a file just to find out that I forgot to remove a single space. womp

anjani-dhrangadhariya commented 4 years ago

For me, it wasn't able to find the path because of a missing forward slash at the start of the path (was on a linux machine by the way)

ArefAz commented 4 years ago

python generate_tfrecord.py --csv_input=./images/annotations_labels.csv output_path=./train.record --images_dir=./images/

I'm getting this:

Traceback (most recent call last): File "generate_tfrecord.py", line 117, in tf.app.run() File "/home/aref/.virtualenvs/tf/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "generate_tfrecord.py", line 102, in main writer = tf.python_io.TFRecordWriter(FLAGS.output_path) File "/home/aref/.virtualenvs/tf/lib/python3.6/site-packages/tensorflow/python/lib/io/tf_record.py", line 218, in init compat.as_bytes(path), options._as_record_writer_options(), status) File "/home/aref/.virtualenvs/tf/lib/python3.6/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: ; No such file or directory

I cannot fix it. Could anybody tell me how to fix it?

MISSIVA20 commented 4 years ago

Bonjour vous avez pu trouver la solution pour ce problème tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: C: /tensorflow1/models1/research/object_detection/training/mscoco_label_map.pbtxt : Le chemin d\udc92acc\udce8s sp\udce9cifi\udce9 est introuvable. ; No such process

ArefAz commented 4 years ago

@MISSIVA20 Hi, can you show me the command you are using before getting the error? It's very likely that is due to a syntax error or maybe your paths are wrong (small typos). Double check them.

MISSIVA20 commented 4 years ago

YES OF COURSE,thank you python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v2_coco.config

Le jeu. 21 mai 2020 Γ  21:17, ArefAz notifications@github.com a Γ©crit :

@MISSIVA20 https://github.com/MISSIVA20 Hi, can you show me the command you are using before getting the error? It's very likely that is due to a syntax error or maybe your paths are wrong (small typos). Double check them.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/models/issues/2984#issuecomment-632293385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOGYGJKXQFWGQKAASA7BWGDRSV42ZANCNFSM4EHSUMTQ .

MISSIVA20 commented 4 years ago

my (ssd_mobilenet_v2_coco.txt ) train_input_reader: { tf_record_input_reader { input_path: "C: /tensorflow1/models1/research/object_detection/train.record" } label_map_path: "C: /tensorflow1/models1/research/object_detection/training/mscoco_label_map.pbtxt" }

eval_config: { num_examples: 800

Note: The below line limits the evaluation process to 10 evaluations.

Remove the below line to evaluate indefinitely.

max_evals: 10 }

eval_input_reader: { tf_record_input_reader { input_path: "C:/tensorflow1/models1/research/object_detection/test.record" } label_map_path: "C:/tensorflow1/models1/research/object_detection/training/mscoco_label_map.pbtxt" shuffle: false num_readers: 1