tensorflow / models

Models and examples built with TensorFlow
Other
76.99k stars 45.78k forks source link

[im2txt] File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status #1317

Closed danny1984 closed 7 years ago

danny1984 commented 7 years ago

Please let us know which model this issue is about (specify the top-level directory)

I got an error when I changed new images.

Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.target(*self.args, *self.kwargs) File "/root/.cache/bazel/_bazel_root/b3feb5ca9298b3da78bc7e698eba84ee/im2txt/bazel-out/local_linux-fastbuild/bin/im2txt/build_algo1688_data.runfiles/im2txt/im2txt/data/build_algo1688_data.py", line 283, in _process_image_files sequence_example = _to_sequence_example(offer, decoder, vocab) File "/root/.cache/bazel/_bazel_root/b3feb5ca9298b3da78bc7e698eba84ee/im2txt/bazel-out/local_linux-fastbuild/bin/im2txt/build_algo1688_data.runfiles/im2txt/im2txt/data/build_algo1688_data.py", line 209, in _to_sequence_example encoded_image = f.read() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 106, in read self._preread_check() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 73, in _preread_check compat.as_bytes(self.name), 1024 512, status) File "/usr/lib/python2.7/contextlib.py", line 24, in exit self.gen.next() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) NotFoundError: /data/projects/content_creator/image2text/im2txt/im2txt/data/my_im2txt/raw-data/images/545962404039_0.jpg

But, the file exists ll /data/projects/content_creator/image2text/im2txt/im2txt/data/my_im2txt/raw-data/images/546568463440_0.jpg -rw-r--r-- 1 60389 users 110254 Apr 7 01:53 /data/projects/content_creator/image2text/im2txt/im2txt/data/my_im2txt/raw-data/images/546568463440_0.jpg

michaelisard commented 7 years ago

Could you indicate what the command line was? Also, you got an error about 545962404039_0.jpg but your directory is shown containing 546568463440_0.jpg.

danny1984 commented 7 years ago

I found the problem that there is an "\n" at the end of my string. when i remove it, it is okay now. Thanks anyway