Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ; No such file or directory

Did some test to train some data and meet such an error and would like to know what's "tf_jenkins" folder used for? after checking my environment and there indeed no such directory on my PC, should i create the folder manually or install some other plugin and create the directory automatically.

2018-03-01 02:31:02.958773: W C:\tf_jenkins\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\op_kernel.cc:1198] Not found: Failed to create a directory: ; No such file or directory

Traceback (most recent call last):

File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_call
    return fn(*args)
  File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1329, in _run_fn
    status, run_metadata)
  File "C:\Programs\Python\Python36\lib\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: Failed to create a directory: ; No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 1593, in save
    {self.saver_def.filename_tensor_name: checkpoint_file})
  File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 895, in run
    run_metadata_ptr)
  File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1128, in _run
    feed_dict_tensor, options, run_metadata)
  File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1344, in _do_run
    options, run_metadata)
  File "C:\Programs\Python\Python36\lib\site-packages\tensorflow\python\client\session.py", line 1363, in _do_call
    raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ; No such file or directory
like image 300
wangxingguo FantasyWangXg Avatar asked Mar 01 '18 05:03

wangxingguo FantasyWangXg


2 Answers

Changing "/" to "\\" helped me to fix that error in Windows 10.

Example of wrong path:

log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

Example of good path:

log_dir="logs\\fit\\" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
like image 143
AndrewPt Avatar answered Sep 29 '22 07:09

AndrewPt


It will be helpful if you can share how are you trying to execute the program.

But in general following could help:

  • check if all the paths (in your case its probably the checkpoint file your are trying to write) are accessible for program, even in the config if any
  • Also check & remove white spaces in command arguments.
like image 26
Amit Kulkarni Avatar answered Sep 29 '22 08:09

Amit Kulkarni