6

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
  • 1
    Looks like you're trying to save weights to a checkpoint file. What code are you running to get this error? – McAngus Aug 16 '18 at 19:00

5 Answers5

6

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")
AndrewPt
  • 685
  • 11
  • 10
3

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.
Amit Kulkarni
  • 654
  • 5
  • 8
3

This generally happens when code is written for linux os in mind and executed on windows as the directory structure in both os are bit different. for example if in python code the path given with linux in mind could be like this "/tmp/output" this will never work in windows it will give you error. In windows either it should be "./tmp/output" or complete path "C:/tmp/output". I always maintain os specific code for both windows and linux in mind. Check for determination of os the link enter link description here

Gilfoyle
  • 3,282
  • 3
  • 47
  • 83
1

It seems the invocation to the "save" function does not have a correct path. You should indicate a correct path where the tensorflow model will be saved, like in the following example:

saver.save(session, '/tmp/model/', global_step=epoch)

In this case, the folder "/tmp/model" must exist.

Esteban Collado
  • 1,840
  • 1
  • 14
  • 15
0

make sure in xml file the filename extension is exist or not like train cam_image1.jpg

Ayaz Khan
  • 104
  • 1
  • 9