FailedPreconditionError: .../Tagger-master8/train; Is a directory

tgulsun: <h2>I received the following error:</h2>
<p>FailedPreconditionError: /home/timucin/Thesis/Tagger-master8/train; Is a directory</p>
<h2>[[{{node input_queues/examples_queue/parallel_read/ReaderReadV2}} = ReaderReadV2[_device="/job:localhost/replica:0/task:0/device:CPU:0"](input_queues/examples_queue/parallel_read/TFRecordReaderV2, input_queues/examples_queue/parallel_read/filenames)]]</h2>
<p>while running a training session of semantic role labeling. I`m using python 2.7 (anaconda) with TensorFlow 1.12 on Ubuntu 18.04.</p>
<p>When I first run the script, train directory is created to store checkpoints and the session terminates with no error.</p>
<p>During the second trial, with the train directory already created, the script looks at the checkpoints to assess whether there are new steps on top of already completed ones and terminates with the above mentioned error. When I empty the content of the directory it behaves the same way and terminates with error. Upon deleting the directory it runs without any problem.</p>
<p>I would appreciate to receive your feedback…</p>
<h2>Thanks in advance,<br>
Timucin</h2>
<p>Trace back:</p>
<p>INFO:tensorflow:Total trainable variables size: 8187305</p>
<p>INFO:tensorflow:Create CheckpointSaverHook.</p>
<p>INFO:tensorflow:Graph was finalized.</p>
<p>INFO:tensorflow:Restoring parameters from train/model.ckpt-10</p>
<p>INFO:tensorflow:Running local_init_op.</p>
<p>INFO:tensorflow:Done running local_init_op.</p>
<p>INFO:tensorflow:Error reported to Coordinator: &lt;class ‘tensorflow.python.framework.errors_impl.FailedPreconditionError’&gt;, /home/timucin/Thesis/Tagger-master8/train; Is a directory</p>
<p>[[{{node input_queues/examples_queue/parallel_read/ReaderReadV2}} = ReaderReadV2[_device="/job:localhost/replica:0/task:0/device:CPU:0"](input_queues/examples_queue/parallel_read/TFRecordReaderV2, input_queues/examples_queue/parallel_read/filenames)]]</p>
<p>INFO:tensorflow:Saving checkpoints for 10 into train/model.ckpt.</p>
<p>Traceback (most recent call last):</p>
<p>File "&lt;ipython-input-6-5b359d738d7d&gt;", line 1, in &lt;module&gt;</p>
<p>runfile(’/home/timucin/Thesis/Tagger-master8/main.py’, args=‘train --model_name deepatt --vocab_path /home/timucin/Thesis/Tagger-master-old/word_dict /home/timucin/Thesis/Tagger-master-old/label_dict --data_path /home/timucin/Thesis/Tagger-master8/ --model_dir train --model_params=feature_size=100,hidden_size=200,filter_size=800,residual_dropout=0.2,num_hidden_layers=10,attention_dropout=0.1,relu_dropout=0.1 --training_params=batch_size=4096,eval_batch_size=1024,optimizer=Adadelta,initializer=orthogonal,use_global_initializer=false,initializer_gain=1.0,train_steps=15,learning_rate_decay=piecewise_constant,learning_rate_values=[1.0,0.5,0.25],learning_rate_boundaries=[400000,500000],device_list=[0],clip_grad_norm=1.0’, wdir=’/home/timucin/Thesis/Tagger-master8’)</p>
<p>File "/home/timucin/anaconda2/lib/python2.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 704, in runfile</p>
<p>execfile(filename, namespace)</p>
<p>File "/home/timucin/anaconda2/lib/python2.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 100, in execfile</p>
<p>builtins.execfile(filename, *where)</p>
<p>File "/home/timucin/Thesis/Tagger-master8/main.py", line 892, in &lt;module&gt;</p>
<p>train(parsed_args)</p>
<p>File "/home/timucin/Thesis/Tagger-master8/main.py", line 540, in train</p>
<p>experiment.train()</p>
<p>File "/home/timucin/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 389, in train</p>
<p>saving_listeners=self._saving_listeners)</p>
<p>File "/home/timucin/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/experiment.py", line 886, in _call_train</p>
<p>input_fn=input_fn, steps=steps, max_steps=max_steps, monitors=hooks)</p>
<p>File "/home/timucin/anaconda2/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 488, in new_func</p>
<p>return func(*args, **kwargs)</p>

Kushaj: <p>This is PyTorch forums, answering Tensorflow queries can be a bit difficult.</p>

tgulsun: <p>Indeed this is correct but I guess the problem is not related with any of those libraries but rather with file I/O.</p>
<p>But in any case this is good idea to post it to another platform like askUbuntu…</p>
<p>Thanks any way…</p>

tgulsun: <p>Problem is solved. Was due to the improper organization of the directory structure…</p>

111111: <p>could you tell me how you solved it concretely?<br>
i meet a similar problem.<br>
thanks a lot!</p>