tensorflow-wavenet icon indicating copy to clipboard operation
tensorflow-wavenet copied to clipboard

Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Open aayush3011 opened this issue 7 years ago • 24 comments

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error.

Using default logdir: ./logdir\train\2017-04-16T14-17-39 Traceback (most recent call last): File "E:/Spring 2017/CS 523/project 3/part-3/tensorflow-wavenet-master/tensorflow-wavenet-master/train.py", line 337, in main() File "E:/Spring 2017/CS 523/project 3/part-3/tensorflow-wavenet-master/tensorflow-wavenet-master/train.py", line 263, in main writer = tf.summary.FileWriter(logdir) File "C:\Anaconda3\lib\site-packages\tensorflow\python\summary\writer\writer.py", line 308, in init event_writer = EventFileWriter(logdir, max_queue, flush_secs) File "C:\Anaconda3\lib\site-packages\tensorflow\python\summary\writer\event_file_writer.py", line 69, in init gfile.MakeDirs(self._logdir) File "C:\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 299, in recursive_create_dir pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status) File "C:\Anaconda3\lib\contextlib.py", line 66, in exit next(self.gen) File "C:\Anaconda3\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

aayush3011 avatar Apr 16 '17 19:04 aayush3011

I'm not a Windows user, but maybe you need to use .\logdir\train\2017-04-16T14-17-39 instead of ./logdir\train\2017-04-16T14-17-39 ? It looks like this is the default logdir though, so try specifying the logdir directly as a command line argument.

devinplatt avatar Apr 17 '17 16:04 devinplatt

I am also having a similar issue: but with ./logdir

Using default logdir: ./logdir/train/2017-12-03T23-24-51 Traceback (most recent call last): File "train.py", line 337, in main() File "train.py", line 263, in main writer = tf.summary.FileWriter(logdir) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/writer/writer.py", line 336, in init filename_suffix) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/writer/event_file_writer.py", line 67, in init gfile.MakeDirs(self._logdir) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 367, in recursive_create_dir pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), 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)) tensorflow.python.framework.errors_impl.PermissionDeniedError: ./logdir

racheljchen avatar Dec 03 '17 23:12 racheljchen

I had that problem. Can't remember the solution. Try running the program with sudo.

Devin Roth

On Dec 3, 2017, at 3:25 PM, racheljchen [email protected] wrote:

I am also having a similar issue:\ but with ./logdir

Using default logdir: ./logdir/train/2017-12-03T23-24-51 Traceback (most recent call last): File "train.py", line 337, in main() File "train.py", line 263, in main writer = tf.summary.FileWriter(logdir) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/writer/writer.py", line 336, in init filename_suffix) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/summary/writer/event_file_writer.py", line 67, in init gfile.MakeDirs(self._logdir) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 367, in recursive_create_dir pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), 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)) tensorflow.python.framework.errors_impl.PermissionDeniedError: ./logdir

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

devinroth avatar Dec 03 '17 23:12 devinroth

realized I was in the wrong directory for tensorflow-wavenet (was using another implementation of it). switched to the folder pulled directly from cloning this project and it didn't give me this problem anymore.

racheljchen avatar Dec 04 '17 04:12 racheljchen

I'm having same problem with logdir pl help me

aishweta avatar Aug 29 '18 06:08 aishweta

I also have such issue ,but resolved by below command python -m retrain --bottleneck_dir=bottlenecks --how_many_training_steps=500 --model_dir=models --summaries_dir=tf_files --output_graph=retrained.pb --output_labels=retrained_labels.txt --architecture="mobilenet_0.50_224" --image_dir=flower_photos

above is my command run successfully in windows 10

mcgrimm avatar Sep 07 '18 07:09 mcgrimm

I think this is simply a 'path' issue. In Windows, just modify the Log directory ROOT from LOGDIR_ROOT = ./logdir to LOGDIR_ROOT = 'logdir'

KashyapKishore avatar Oct 09 '18 08:10 KashyapKishore

In Windows, create folder manually.

arghyachaks avatar May 28 '19 06:05 arghyachaks

In Windows, create folder manually.

please can you explain further, do you mean the logs folder should be created manually

hallibay avatar Oct 28 '19 12:10 hallibay

@hallibay Yes, I had this issue too on my Windows 10 machine. My error looked like this:

NotFoundError: Failed to create a directory: ./23_logs\train\plugins\profile\2019-11-11_13-02-07; No such file or directory

So, for me, within the directory of my project's .py file, or whichever folder I'm running the program from, I needed to manually create a folder called 23_logs, then within that folder, manually create a new folder called train, and then within the train folder, create a new folder called plugins, and again for profile. Then I just re-ran the program and it worked. Not sure why TF doesn't just make the directory's as it needs but whatever. Hope that helps?

windowshopr avatar Nov 11 '19 19:11 windowshopr

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

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

StenkinVlad avatar Nov 19 '19 10:11 StenkinVlad

I found out the solution.

just replace the path with "r" in the beginning in the code wherever the path strings are mentioned.

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

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

yashyennam avatar Nov 27 '19 13:11 yashyennam

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

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

This worked for me..thanks@StenkinVlad

srinivascnu166 avatar Jan 01 '20 17:01 srinivascnu166

Failed to create a directory: Logs\20200303/27/20-013517\train; No such file or directory [Op:CreateSummaryFileWriter]

I am using windows 10. Found the solution for this: log_dir=os.path.join('logs',datetime.datetime.now().strftime("%Y%m%D")) change it to single quotes.

NamanDhameja avatar Mar 26 '20 20:03 NamanDhameja

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

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

this worked for me.

Terkea avatar Apr 04 '20 01:04 Terkea

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

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

NEMO-WXL avatar May 04 '20 02:05 NEMO-WXL

it worked,thank you

NEMO-WXL avatar May 04 '20 02:05 NEMO-WXL

I had the same issue with the log file location for tensorboard. The following quick fix worked for me on Win10:

  1. use pathlib to define your paths: from pathlib import Path
  2. provide Path object for tensorboard: target_dir_tb = Path.cwd() / "logs" / ... # specify location for tensorboard files in a Path object tb = TensorBoard(log_dir=target_dir_tb, # this must be a Path object! histogram_freq=15,
    batch_size=batch_size, write_graph=True, write_grads=True)

Benedetto05 avatar May 13 '20 05:05 Benedetto05

Doesn't it work if i have used os instead of path ? I have used all these things to set path but it still seems to be taking the wrong path

prudhvi0394 avatar Jun 19 '20 19:06 prudhvi0394

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

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

@NEMO-WXL replacing the slashes worked. What is the purpose behind the replacement? Is this a windows specific fix?

mthomp89 avatar Jul 22 '20 13:07 mthomp89

I am having the following error when trying to train the VCTK-Corpus. I am using tensorflow version "0.12.1". Does anybody knows how to resolve this error. ... pywrap_tensorflow.TF_GetCode(status)) tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./logdir\train\2017-04-16T14-17-39

Fix that worked for me in Windows10 Instead of path suggested by TF tutorial: log_dir="logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") Use this: log_dir="logs\\fit\\" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

This worked for me..thanks@StenkinVlad

ozert avatar Aug 01 '20 22:08 ozert

I think this is simply a 'path' issue. In Windows, just modify the Log directory ROOT from LOGDIR_ROOT = ./logdir to LOGDIR_ROOT = 'logdir'

Thanks :)

mahdibidar avatar Oct 26 '20 00:10 mahdibidar

This bug still exists on Windows: tbCall = TensorBoard(log_dir='./log/1000') turns out to be :

tensorflow.python.framework.errors_impl.NotFoundError: Failed to create a directory: ./log/1000\train; No such file or directory

Anyone can help? Thanks!

Tony-Yan2018 avatar Nov 11 '20 00:11 Tony-Yan2018

What helped me, is wrapping the path with Path object (from pathlib module) and converting back to str

diman82 avatar Feb 22 '21 09:02 diman82