Sandy88
Sandy88

Reputation: 21

When running " python mnist_with_summaries.py ", it has occurred the error

  1. When running this example:" python mnist_with_summaries.py ", it has occurred the following error:

  2. detailed errors:

    Traceback (most recent call last): File "mnist_with_summaries.py", line 214, in tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) File "D:\ProgramData\Anaconda2\envs\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py" , line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "mnist_with_summaries.py", line 186, in main tf.gfile.MakeDirs(FLAGS.log_dir) File "D:\ProgramData\Anaconda2\envs\Anaconda3\lib\site-packages\tensorflow\python\lib\io\file_io.p y", line 367, in recursive_create_dir pywrap_tensorflow.RecursivelyCreateDir(compat.as_bytes(dirname), status) File "D:\ProgramData\Anaconda2\envs\Anaconda3\lib\contextlib.py", line 89, in exit next(self.gen) File "D:\ProgramData\Anaconda2\envs\Anaconda3\lib\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: Failed to create a directory: /tmp\tensorflow

  3. Running environment:windows7+Anaconda3+python3.6+tensorflow1.3.0

  4. Why?Any idea on how to resolve this problem?Thank you!

Upvotes: 1

Views: 270

Answers (1)

Sandy88
Sandy88

Reputation: 21

  • I have solved this problem.
  • I changed line 204 and line 210 of mnist_with_summaries.py to the local directories, and I created some folders.
  • OR, don't change the code, and I created some folders in the local disk where is the running environment according to the code.

    • line 204: create /tmp/tensorflow/mnist/input_data

    • line 210: create /tmp/tensorflow/mnist/logs/mnist_with_summaries

Upvotes: 1

Related Questions