FileNotFoundError
zanaviska opened this issue · comments
python version: 3.7.9
pip version: 20.3.3
I run the following command
python .\train.py
And get the following error
File ".\train.py", line 167, in <module>
for i_iter, batch in enumerate(tqdm_gen):
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\tqdm\std.py", line 1166, in __iter__
for obj in iterable:
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 345, in __next__
data = self._next_data()
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 856, in _next_data
return self._process_data(data)
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\dataloader.py", line 881, in _process_data
data.reraise()
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\_utils.py", line 395, in reraise
raise self.exc_type(msg)
FileNotFoundError: Caught FileNotFoundError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\_utils\worker.py", line 178, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\utils\data\_utils\fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "C:\Users\avh\Desktop\proj\dnn\CaNet\dataset_mask_train.py", line 95, in __getitem__
os.path.join(self.data_dir, 'JPEGImages', support_name + '.jpg'))))))
File "C:\Users\avh\AppData\Local\Programs\Python\Python37\lib\site-packages\PIL\Image.py", line 2904, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '.\\JPEGImages\\2010_004817.jpg'
As good as I understand, there should be folder JPEGImages, with a lot of images. Can you provide example of that folder?