FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0

kumar1997: <p>when I run the vesicular_gru.py here is the error:</p>
<pre><code class="lang-auto">/home/kumar/anaconda3/envs/pytorch/bin/python /home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py 
positive:  1771
negative:  6058
Length Train Dataset:  7829 

positive:  443
negative:  1515
Length Validation Dataset:  1958 

/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/nn/modules/rnn.py:62: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.01 and num_layers=1
  warnings.warn("dropout option adds dropout after all but last "
Traceback (most recent call last):
  File "/home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py", line 457, in &lt;module&gt;
    train()
  File "/home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py", line 406, in train
    epoch_loss_train_avg = train_one_epoch(learning_rate)
  File "/home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py", line 182, in train_one_epoch
    for i, data in enumerate(train_loader, 0):
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/_utils.py", line 434, in reraise
    raise exception
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/kumar/anaconda3/envs/pytorch/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in &lt;listcomp&gt;
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py", line 74, in __getitem__
    lines = load_text_file(self.lst_path[index])
  File "/home/kumar/SKKU/khanhlee/vesicular-gru/vesicular-gru-master/vesicular_gru.py", line 43, in load_text_file
    with open(file_text) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/pssm/pssm/membrane/cvQ9R233.pssm'


Process finished with exit code 1
</code></pre>
<p>I have no idea how to fix this error. p33450.pssm is really an existing file in the directory: ‘data/pssm/pssm/membrane/cv/P33450.pssm’. How can I fix that error</p>

ptrblck: <aside class="quote no-group" data-username="kumar1997" data-post="1" data-topic="158664">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/kumar1997/48/29377_2.png" class="avatar"> kumar1997:</div>
<blockquote>
<p>p33450.pssm is really an existing file in the directory: ‘data/pssm/pssm/membrane/cv/P33450.pssm’.</p>
</blockquote>
</aside>
<p>The file in question uses a different name as:</p>
<pre><code class="lang-auto">'data/pssm/pssm/membrane/cvQ9R233.pssm'
</code></pre>
<p>Note the additional directory called <code>cv</code> and the different file name.</p>

kumar1997: <p><a class="mention" href="/u/ptrblck">@ptrblck</a>, Sorry It should be <code>data/pssm/pssm/membrane/cv/Q9R233.pssm</code>. I entered the wrong file instead of Q9R233.pssm, I typed P33450.pssm!</p>